This is the documentation for Enlighten.
class Enlighten PointProjection
class Enlighten::PointProjection
  └>Geo::IRtMesh
    └>Geo::IGeoReleasable
Utility class for projecting points into a triangle surface, and optionally 'pushing up'.
Functions
Name | Description |
---|---|
Create(Geo::GeoArray< PointProjectionVertex > &, Geo::GeoArray< Geo::s32 > &, Geo::GeoArray< bool > &, bool) | Create the projection object with a set of geometry to project onto. |
GetNumRtTriangles() | Returns how many triangles in the mesh. |
GetNumRtVertices() | Returns how many vertices in the mesh. |
ProjectPoint(PointProjectionScratchMem &, const Geo::v128, const Geo::v128, float, float) | Project a point. |
ProjectPointAndCalculateNormal(PointProjectionScratchMem &, const Geo::v128, const Geo::v128, Geo::v128 &, Geo::v128 &, float, float) | Project a point and retrieve the normal of this point on the projected onto surface Note that this requires that the ProjectionPoint structures have proper normals set. |
Release() | Destroy this object. |
Release() | Free this object that was created within the Enlighten libraries. |
VisitRtMesh(EmbreeRtMeshVisitor &) | Calls methods on the given RtMeshVisitor for each vertex and triangle in the mesh. |
static PointProjection* Enlighten::PointProjection::Create
public: PointProjection * Create
(
  Geo::GeoArray< PointProjectionVertex > & verts,
  Geo::GeoArray< Geo::s32 > & triIndices,
  Geo::GeoArray< bool > & triIsBlocking,
  bool includePushOff
)
Create the projection object with a set of geometry to project onto.
Note
In order to save on unnecessary memory copies the contents of the input arrays are grabbed by this class, so after this call these arrays will be empty. Take a copy in advance if you need to use the data in the arrays beyond this call. Also, this class uses the Embree ray tracing engine if you specify includePushOff==true. Embree must be initialised during the lifetime of this class. For instance, using the Geo::InitRayTracing class. This is not required if includePushOff==false.
Parameters
[in] | verts | The vertices of the geometry to project onto. All must have valid positions. Normals only need to be valid if includePushOff is true. |
[in] | triIndices | The triangle indices of the geometry to project onto. Must be a multiple of 3 and all indices must be in range of verts. |
[in] | triIsBlocking | Array of bools a 1/3rd of the length of triIndices that determines whether a triangle can be pushed through or is blocking. |
[in] | includePushOff | Whether to build acceleration structures to allow a non-zero maxRayIntersectionDistance in ProjectPoint(). |
virtual Geo::s32 Geo::IRtMesh::GetNumRtTriangles
public: Geo::s32 GetNumRtTriangles() const
Returns how many triangles in the mesh.
virtual Geo::s32 Geo::IRtMesh::GetNumRtVertices
public: Geo::s32 GetNumRtVertices() const
Returns how many vertices in the mesh.
Geo::v128 Enlighten::PointProjection::ProjectPoint
public: Geo::v128 ProjectPoint
(
  PointProjectionScratchMem & scratchMem,
  const Geo::v128 position,
  const Geo::v128 normal,
  float maxRayIntersectionDistance,
  float triThickness
) const
Project a point.
void Enlighten::PointProjection::ProjectPointAndCalculateNormal
public: void ProjectPointAndCalculateNormal
(
  PointProjectionScratchMem & scratchMem,
  const Geo::v128 position,
  const Geo::v128 normal,
  Geo::v128 & outputPosition,
  Geo::v128 & outputNormal,
  float maxRayIntersectionDistance,
  float triThickness
) const
Project a point and retrieve the normal of this point on the projected onto surface Note that this requires that the ProjectionPoint structures have proper normals set.
virtual void Enlighten::PointProjection::Release
public: virtual void Release()
Destroy this object.
virtual void Geo::IGeoReleasable::Release
public: void Release()
Free this object that was created within the Enlighten libraries.
Expect this to behave in a similar way to calling 'delete(this)'
virtual void Geo::IRtMesh::VisitRtMesh
public: void VisitRtMesh
(
  EmbreeRtMeshVisitor & visitor
) const
Calls methods on the given RtMeshVisitor for each vertex and triangle in the mesh.