Cogs.Core
|
Public Member Functions | |
InstancedMeshPicker (InstancedMeshRenderSystem *system) | |
![]() | |
bool | pickCamera (Context *context, const CameraComponent &camera, const glm::vec2 &normPosition, float, float radius, PickingFlags pickingFlags, PicksReturned returnFlag, const RayPicking::RayPickFilter &filter, std::vector< RayPicking::RayPickHit > &hits) override |
Do a ray pick from a normalized screen space position in the camera direction and return all hits. | |
bool | pickRay (Context *context, const glm::vec3 &startPos, const glm::quat &rot, float rayLength, float radius, PickingFlags pickingFlags, PicksReturned returnFlag, const RayPicking::RayPickFilter &filter, std::vector< RayPicking::RayPickHit > &hits) override |
Do a ray pick from a position and orientation in world space and return all hits. | |
virtual COGSCORE_DLL_API bool | pickCamera (Context *context, const CameraComponent &camera, const glm::vec2 &queryClip, float rayLength, float rayRadius, PickingFlags pickingFlags, PicksReturned returnFlag, const RayPicking::RayPickFilter &filter, std::vector< RayPicking::RayPickHit > &hits)=0 |
Do a ray pick from a normalized screen space position in the camera direction and return all hits. | |
virtual COGSCORE_DLL_API bool | pickRay (Context *, const glm::vec3 &, const glm::quat &, float, float, PickingFlags, PicksReturned, const RayPicking::RayPickFilter &, std::vector< RayPicking::RayPickHit > &) |
Do a ray pick from a position and orientation in world space and return all hits. | |
Private Member Functions | |
bool | pickImpl (Context *context, const glm::mat4 &worldPickMatrix, const glm::mat4 &rawViewProjection, const glm::mat4 &viewMatrix, const RayPicking::RayPickFilter &filter, PickingFlags pickingFlags, PicksReturned returnFlag, std::vector< RayPicking::RayPickHit > &hits) override |
Each mesh rendering system should implement this function that goes through all components and calls pickMesh with the appropiate params. | |
Private Attributes | |
InstancedMeshRenderSystem * | system = nullptr |
Additional Inherited Members | |
virtual bool | pickImpl (Context *context, const glm::mat4 &worldPickMatrix, const glm::mat4 &rawViewProjection, const glm::mat4 &viewMatrix, const RayPicking::RayPickFilter &filter, PickingFlags pickingFlags, PicksReturned returnFlag, std::vector< RayPicking::RayPickHit > &hits)=0 |
Each mesh rendering system should implement this function that goes through all components and calls pickMesh with the appropiate params. | |
![]() | |
static TextureCoordinateInfo | getTextureCoordinateInfo (const Cogs::Core::Mesh &mesh) |
static bool | clippedByClipComp (const ClipShapeData &clipData, const glm::vec4 &position) |
static glm::vec2 | getTextureCoords (const TextureCoordinateInfo &textureInfo, const RayIntersectionHit &hit, const PickingFlags pickingFlags) |
Definition at line 29 of file InstancedMeshRenderSystem.h.
|
inlineexplicit |
Definition at line 31 of file InstancedMeshRenderSystem.h.
|
overrideprivatevirtual |
Each mesh rendering system should implement this function that goes through all components and calls pickMesh with the appropiate params.
Implements Cogs::Core::MeshRayPickableBase.
Definition at line 292 of file InstancedMeshRenderSystem.cpp.
References Cogs::Core::AllSorted, Cogs::Core::RenderComponent::clipShapeComponent, Cogs::Core::Closest, Cogs::Core::RenderComponent::LodData::currentLod, Cogs::Core::ForcePickable, Cogs::Core::InstancedMeshRenderComponent::getRenderCount(), Cogs::Core::Mesh::getSemanticStream(), Cogs::Core::InstancedMeshRenderComponent::instanceCount, Cogs::Core::InstancedMeshRenderComponent::instanceMesh, Cogs::InstanceVector, Cogs::Core::RenderComponent::isPickable(), Cogs::Core::RenderComponent::isRenderFlagSet(), Cogs::Core::RayPicking::RayPickFilter::isUnwantedType(), Cogs::Core::RenderComponent::isVisible(), Cogs::Core::RenderComponent::isVisibleInLayer(), Cogs::Core::RayPicking::RayPickFilter::layerMask, Cogs::Core::ResourceHandle_t< ResourceType >::resolve(), Cogs::ComponentModel::ComponentHandle::resolveComponent(), Cogs::Core::ReturnChildEntity, Cogs::Core::RenderComponent::LodData::selectedLod, Cogs::Core::InstancedMeshRenderComponent::startIndex, Cogs::Core::InstancedMeshRenderComponent::startInstance, and Cogs::Core::InstancedMeshRenderComponent::vertexCount.
|
private |
Definition at line 43 of file InstancedMeshRenderSystem.h.