vsg: vsg::PolytopeIntersector Class Reference

vsg 1.1.8 VulkanSceneGraph library

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
vsg::PolytopeIntersector Class Reference

PolytopeIntersector is an Intersector subclass that provides support for computing intersections between a line segment and geometry in the scene graph. More...

`#include <PolytopeIntersector.h>`

Inheritance diagram for vsg::PolytopeIntersector:
[legend]
Collaboration diagram for vsg::PolytopeIntersector:
[legend]

## Classes
class | Intersection

## Public Types
using | Intersections = std::vector<ref_ptr<Intersection>>
Public Types inherited from vsg::Intersector
using | NodePath = std::vector<const Node*>
using | ArrayStateStack = std::vector<ref_ptr<ArrayState>>

## Public Member Functions
| PolytopeIntersector (const Polytope &in_polytope, ref_ptr< ArrayState > initialArrayData={})
| create intersector for specified polytope.
| PolytopeIntersector (const Camera &camera, double xMin, double yMin, double xMax, double yMax, ref_ptr< ArrayState > initialArrayData={})
| create intersector for a polytope with window space dimensions, projected into world coords using the Camera's projection and view matrices.
ref_ptr< Intersection > | add (const dvec3 &coord, const std::vector< uint32_t > &indices, uint32_t instanceIndex)
void | pushTransform (const Transform &transform) override
| clone and transform this Intersector to provide a new Intersector in local coordinates
void | popTransform () override
bool | intersects (const dsphere &bs) override
| check for intersection with sphere
bool | intersectDraw (uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount) override
| intersect with a vkCmdDraw primitive
bool | intersectDrawIndexed (uint32_t firstIndex, uint32_t indexCount, uint32_t firstInstance, uint32_t instanceCount) override
| intersect with a vkCmdDrawIndexed primitive
Public Member Functions inherited from vsg::Inherit< Intersector, PolytopeIntersector >
| Inherit (Args &&... args)
std::size_t | sizeofObject () const noexcept override
const char * | className () const noexcept override
const std::type_info & | type_info () const noexcept override
bool | is_compatible (const std::type_info &type) const noexcept override
int | compare (const Object &rhs) const override
void | accept (Visitor &visitor) override
void | accept (ConstVisitor &visitor) const override
void | accept (RecordTraversal &visitor) const override
Public Member Functions inherited from vsg::Intersector
| Intersector (ref_ptr< ArrayState > initialArrayState={})
void | apply (const Node &node) override
void | apply (const StateGroup &stategroup) override
void | apply (const Transform &transform) override
void | apply (const LOD &lod) override
void | apply (const PagedLOD &plod) override
void | apply (const CullNode &cn) override
void | apply (const CullGroup &cn) override
void | apply (const DepthSorted &cn) override
void | apply (const VertexDraw &vid) override
void | apply (const VertexIndexDraw &vid) override
void | apply (const Geometry &geometry) override
void | apply (const BindVertexBuffers &bvb) override
void | apply (const BindIndexBuffer &bib) override
void | apply (const Draw &draw) override
void | apply (const DrawIndexed &drawIndexed) override
void | apply (const BufferInfo &bufferInfo) override
void | apply (const ushortArray &array) override
void | apply (const uintArray &array) override
void | apply (const TextTechnique &technique) override
std::vector< dmat4 > & | localToWorldStack ()
| get the current local to world matrix stack
std::vector< dmat4 > & | worldToLocalStack ()
| get the current world to local matrix stack
Public Member Functions inherited from vsg::Inherit< ConstVisitor, Intersector >
| Inherit (Args &&... args)
Public Member Functions inherited from vsg::ConstVisitor
| ConstVisitor (const ConstVisitor &rhs, const CopyOp &copyop={})
virtual Instrumentation * | getInstrumentation ()
virtual void | apply (const Object &)
virtual void | apply (const Objects &)
virtual void | apply (const External &)
virtual void | apply (const Data &)
virtual void | apply (const stringValue &)
virtual void | apply (const wstringValue &)
virtual void | apply (const boolValue &)
virtual void | apply (const intValue &)
virtual void | apply (const uintValue &)
virtual void | apply (const floatValue &)
virtual void | apply (const doubleValue &)
virtual void | apply (const vec2Value &)
virtual void | apply (const vec3Value &)
virtual void | apply (const vec4Value &)
virtual void | apply (const dvec2Value &)
virtual void | apply (const dvec3Value &)
virtual void | apply (const dvec4Value &)
virtual void | apply (const bvec2Value &)
virtual void | apply (const bvec3Value &)
virtual void | apply (const bvec4Value &)
virtual void | apply (const ubvec2Value &)
virtual void | apply (const ubvec3Value &)
virtual void | apply (const ubvec4Value &)
virtual void | apply (const svec2Value &)
virtual void | apply (const svec3Value &)
virtual void | apply (const svec4Value &)
virtual void | apply (const usvec2Value &)
virtual void | apply (const usvec3Value &)
virtual void | apply (const usvec4Value &)
virtual void | apply (const ivec2Value &)
virtual void | apply (const ivec3Value &)
virtual void | apply (const ivec4Value &)
virtual void | apply (const uivec2Value &)
virtual void | apply (const uivec3Value &)
virtual void | apply (const uivec4Value &)
virtual void | apply (const mat4Value &)
virtual void | apply (const dmat4Value &)
virtual void | apply (const byteArray &)
virtual void | apply (const ubyteArray &)
virtual void | apply (const shortArray &)
virtual void | apply (const intArray &)
virtual void | apply (const floatArray &)
virtual void | apply (const doubleArray &)
virtual void | apply (const vec2Array &)
virtual void | apply (const vec3Array &)
virtual void | apply (const vec4Array &)
virtual void | apply (const dvec2Array &)
virtual void | apply (const dvec3Array &)
virtual void | apply (const dvec4Array &)
virtual void | apply (const bvec2Array &)
virtual void | apply (const bvec3Array &)
virtual void | apply (const bvec4Array &)
virtual void | apply (const svec2Array &)
virtual void | apply (const svec3Array &)
virtual void | apply (const svec4Array &)
virtual void | apply (const ivec2Array &)
virtual void | apply (const ivec3Array &)
virtual void | apply (const ivec4Array &)
virtual void | apply (const ubvec2Array &)
virtual void | apply (const ubvec3Array &)
virtual void | apply (const ubvec4Array &)
virtual void | apply (const usvec2Array &)
virtual void | apply (const usvec3Array &)
virtual void | apply (const usvec4Array &)
virtual void | apply (const uivec2Array &)
virtual void | apply (const uivec3Array &)
virtual void | apply (const uivec4Array &)
virtual void | apply (const mat4Array &)
virtual void | apply (const dmat4Array &)
virtual void | apply (const block64Array &)
virtual void | apply (const block128Array &)
virtual void | apply (const ubyteArray2D &)
virtual void | apply (const ushortArray2D &)
virtual void | apply (const uintArray2D &)
virtual void | apply (const floatArray2D &)
virtual void | apply (const doubleArray2D &)
virtual void | apply (const vec2Array2D &)
virtual void | apply (const vec3Array2D &)
virtual void | apply (const vec4Array2D &)
virtual void | apply (const dvec2Array2D &)
virtual void | apply (const dvec3Array2D &)
virtual void | apply (const dvec4Array2D &)
virtual void | apply (const bvec2Array2D &)
virtual void | apply (const bvec3Array2D &)
virtual void | apply (const bvec4Array2D &)
virtual void | apply (const svec2Array2D &)
virtual void | apply (const svec3Array2D &)
virtual void | apply (const svec4Array2D &)
virtual void | apply (const ivec2Array2D &)
virtual void | apply (const ivec3Array2D &)
virtual void | apply (const ivec4Array2D &)
virtual void | apply (const ubvec2Array2D &)
virtual void | apply (const ubvec3Array2D &)
virtual void | apply (const ubvec4Array2D &)
virtual void | apply (const usvec2Array2D &)
virtual void | apply (const usvec3Array2D &)
virtual void | apply (const usvec4Array2D &)
virtual void | apply (const uivec2Array2D &)
virtual void | apply (const uivec3Array2D &)
virtual void | apply (const uivec4Array2D &)
virtual void | apply (const block64Array2D &)
virtual void | apply (const block128Array2D &)
virtual void | apply (const ubyteArray3D &)
virtual void | apply (const ushortArray3D &)
virtual void | apply (const uintArray3D &)
virtual void | apply (const floatArray3D &)
virtual void | apply (const doubleArray3D &)
virtual void | apply (const vec2Array3D &)
virtual void | apply (const vec3Array3D &)
virtual void | apply (const vec4Array3D &)
virtual void | apply (const dvec2Array3D &)
virtual void | apply (const dvec3Array3D &)
virtual void | apply (const dvec4Array3D &)
virtual void | apply (const ubvec2Array3D &)
virtual void | apply (const ubvec3Array3D &)
virtual void | apply (const ubvec4Array3D &)
virtual void | apply (const block64Array3D &)
virtual void | apply (const block128Array3D &)
virtual void | apply (const Compilable &)
virtual void | apply (const Commands &)
virtual void | apply (const Group &)
virtual void | apply (const QuadGroup &)
virtual void | apply (const MatrixTransform &)
virtual void | apply (const Layer &)
virtual void | apply (const Bin &)
virtual void | apply (const Switch &)
virtual void | apply (const Light &)
virtual void | apply (const AmbientLight &)
virtual void | apply (const DirectionalLight &)
virtual void | apply (const PointLight &)
virtual void | apply (const SpotLight &)
virtual void | apply (const InstrumentationNode &)
virtual void | apply (const RegionOfInterest &)
virtual void | apply (const Text &)
virtual void | apply (const TextGroup &)
virtual void | apply (const TextLayout &)
virtual void | apply (const Animation &)
virtual void | apply (const AnimationGroup &)
virtual void | apply (const AnimationSampler &)
virtual void | apply (const JointSampler &)
virtual void | apply (const MorphSampler &)
virtual void | apply (const TransformSampler &)
virtual void | apply (const Joint &)
virtual void | apply (const ImageInfo &)
virtual void | apply (const ImageView &)
virtual void | apply (const Image &)
virtual void | apply (const Command &)
virtual void | apply (const StateCommand &)
virtual void | apply (const StateSwitch &)
virtual void | apply (const CommandBuffer &)
virtual void | apply (const RenderPass &)
virtual void | apply (const BindDescriptorSet &)
virtual void | apply (const BindDescriptorSets &)
virtual void | apply (const BindViewDescriptorSets &)
virtual void | apply (const Descriptor &)
virtual void | apply (const DescriptorBuffer &)
virtual void | apply (const DescriptorImage &)
virtual void | apply (const DescriptorSet &)
virtual void | apply (const BindComputePipeline &)
virtual void | apply (const BindGraphicsPipeline &)
virtual void | apply (const BindRayTracingPipeline &)
virtual void | apply (const GraphicsPipeline &)
virtual void | apply (const ComputePipeline &)
virtual void | apply (const RayTracingPipeline &)
virtual void | apply (const GraphicsPipelineState &)
virtual void | apply (const ShaderStage &)
virtual void | apply (const VertexInputState &)
virtual void | apply (const InputAssemblyState &)
virtual void | apply (const TessellationState &)
virtual void | apply (const ViewportState &)
virtual void | apply (const RasterizationState &)
virtual void | apply (const MultisampleState &)
virtual void | apply (const DepthStencilState &)
virtual void | apply (const ColorBlendState &)
virtual void | apply (const DynamicState &)
virtual void | apply (const ResourceHints &)
virtual void | apply (const ClearAttachments &)
virtual void | apply (const ClearColorImage &)
virtual void | apply (const ClearDepthStencilImage &)
virtual void | apply (const QueryPool &)
virtual void | apply (const ResetQueryPool &)
virtual void | apply (const BeginQuery &)
virtual void | apply (const EndQuery &)
virtual void | apply (const WriteTimestamp &)
virtual void | apply (const CopyQueryPoolResults &)
virtual void | apply (const DrawMeshTasks &)
virtual void | apply (const DrawMeshTasksIndirect &)
virtual void | apply (const DrawMeshTasksIndirectCount &)
virtual void | apply (const UIEvent &)
virtual void | apply (const WindowEvent &)
virtual void | apply (const ExposeWindowEvent &)
virtual void | apply (const ConfigureWindowEvent &)
virtual void | apply (const CloseWindowEvent &)
virtual void | apply (const FocusInEvent &)
virtual void | apply (const FocusOutEvent &)
virtual void | apply (const KeyEvent &)
virtual void | apply (const KeyPressEvent &)
virtual void | apply (const KeyReleaseEvent &)
virtual void | apply (const PointerEvent &)
virtual void | apply (const ButtonPressEvent &)
virtual void | apply (const ButtonReleaseEvent &)
virtual void | apply (const MoveEvent &)
virtual void | apply (const TouchEvent &)
virtual void | apply (const TouchDownEvent &)
virtual void | apply (const TouchUpEvent &)
virtual void | apply (const TouchMoveEvent &)
virtual void | apply (const ScrollWheelEvent &)
virtual void | apply (const TerminateEvent &)
virtual void | apply (const FrameEvent &)
virtual void | apply (const ShaderCompileSettings &)
virtual void | apply (const Camera &)
virtual void | apply (const CommandGraph &)
virtual void | apply (const SecondaryCommandGraph &)
virtual void | apply (const RenderGraph &)
virtual void | apply (const View &)
virtual void | apply (const Viewer &)
virtual void | apply (const ViewMatrix &)
virtual void | apply (const LookAt &)
virtual void | apply (const RelativeViewMatrix &)
virtual void | apply (const TrackingViewMatrix &)
virtual void | apply (const ProjectionMatrix &)
virtual void | apply (const Perspective &)
virtual void | apply (const Orthographic &)
virtual void | apply (const RelativeProjection &)
virtual void | apply (const EllipsoidPerspective &)
virtual void | apply (const FrameStamp &)
Public Member Functions inherited from vsg::Object
| Object (const Object &object, const CopyOp &copyop={})
Object & | operator= (const Object &)
template<class T >
T * | cast ()
template<class T >
const T * | cast () const
virtual ref_ptr< Object > | clone (const CopyOp &copyop={}) const
virtual void | traverse (Visitor &)
virtual void | traverse (ConstVisitor &) const
virtual void | traverse (RecordTraversal &) const
virtual void | read (Input &input)
virtual void | write (Output &output) const
void | ref () const noexcept
void | unref () const noexcept
void | unref_nodelete () const noexcept
unsigned int | referenceCount () const noexcept
template<typename T >
void | setValue (const std::string &key, const T &value)
void | setValue (const std::string &key, const char *value)
| specialization of setValue to handle passing C strings
template<typename T >
bool | getValue (const std::string &key, T &value) const
| get specified value type, return false if value associated with key is not assigned or is not the correct type
void | setObject (const std::string &key, ref_ptr< Object > object)
| assign an Object associated with key
Object * | getObject (const std::string &key)
| get Object pointer associated with key, return nullptr if no object associated with key has been assigned
const Object * | getObject (const std::string &key) const
| get const Object pointer associated with key, return nullptr if no object associated with key has been assigned
template<class T >
T * | getObject (const std::string &key)
| get object pointer of specified type associated with key, return nullptr if no object associated with key has been assigned
template<class T >
const T * | getObject (const std::string &key) const
| get const object pointer of specified type associated with key, return nullptr if no object associated with key has been assigned
ref_ptr< Object > | getRefObject (const std::string &key)
| get ref_ptr<Object> associated with key, return nullptr if no object associated with key has been assigned
ref_ptr< const Object > | getRefObject (const std::string &key) const
| get ref_ptr<const Object> pointer associated with key, return nullptr if no object associated with key has been assigned
template<class T >
ref_ptr< T > | getRefObject (const std::string &key)
| get ref_ptr<T> of specified type associated with key, return nullptr if no object associated with key has been assigned
template<class T >
const ref_ptr< const T > | getRefObject (const std::string &key) const
| get ref_ptr<const T> of specified type associated with key, return nullptr if no object associated with key has been assigned
void | removeObject (const std::string &key)
| remove meta object or value associated with key
Auxiliary * | getOrCreateAuxiliary ()
Auxiliary * | getAuxiliary ()
const Auxiliary * | getAuxiliary () const

## Public Attributes
Intersections | intersections
Public Attributes inherited from vsg::ConstVisitor
Mask | traversalMask = MASK_ALL
Mask | overrideMask = MASK_OFF

## Protected Attributes
std::vector< Polytope > | _polytopeStack
Protected Attributes inherited from vsg::Intersector
ArrayStateStack | arrayStateStack
ref_ptr< const ushortArray > | ushort_indices
ref_ptr< const uintArray > | uint_indices
NodePath | _nodePath

## Additional Inherited Members
Static Public Member Functions inherited from vsg::Inherit< Intersector, PolytopeIntersector >
static ref_ptr< PolytopeIntersector > | create (Args &&... args)
static ref_ptr< PolytopeIntersector > | create_if (bool flag, Args &&... args)
Static Public Member Functions inherited from vsg::Inherit< ConstVisitor, Intersector >
static ref_ptr< Intersector > | create (Args &&... args)
static ref_ptr< Intersector > | create_if (bool flag, Args &&... args)
Static Public Member Functions inherited from vsg::Object
static ref_ptr< Object > | create ()
static ref_ptr< Object > | create_if (bool flag)
static void * | operator new (std::size_t count)
| provide new and delete to enable custom memory management via the vsg::Allocator singleton, using the MEMORY_AFFINTY_OBJECTS
static void | operator delete (void *ptr)
Protected Member Functions inherited from vsg::Object
virtual void | _attemptDelete () const
void | setAuxiliary (Auxiliary *auxiliary)

## Detailed Description

PolytopeIntersector is an Intersector subclass that provides support for computing intersections between a line segment and geometry in the scene graph.

## Member Function Documentation

## ◆ intersectDraw()

bool vsg::PolytopeIntersector::intersectDraw | ( | uint32_t | firstVertex,
|  | uint32_t | vertexCount,
|  | uint32_t | firstInstance,
|  | uint32_t | instanceCount )
| overridevirtual

intersect with a vkCmdDraw primitive

Implements vsg::Intersector.

## ◆ intersectDrawIndexed()

bool vsg::PolytopeIntersector::intersectDrawIndexed | ( | uint32_t | firstIndex,
|  | uint32_t | indexCount,
|  | uint32_t | firstInstance,
|  | uint32_t | instanceCount )
| overridevirtual

intersect with a vkCmdDrawIndexed primitive

Implements vsg::Intersector.

## ◆ intersects()

bool vsg::PolytopeIntersector::intersects | ( | const dsphere & | bs | ) |
| overridevirtual

check for intersection with sphere

Implements vsg::Intersector.

## ◆ popTransform()

void vsg::PolytopeIntersector::popTransform | ( |  | ) |
| overridevirtual

Implements vsg::Intersector.

## ◆ pushTransform()

void vsg::PolytopeIntersector::pushTransform | ( | const Transform & | transform | ) |
| overridevirtual

clone and transform this Intersector to provide a new Intersector in local coordinates

Implements vsg::Intersector.

The documentation for this class was generated from the following file:

- include/vsg/utils/PolytopeIntersector.h