Bifrost SDK
Bifrost SDK documentation
Bifrost::Geometry::Common::GeoLocation Class Reference

Describes a location within, or on the surface of, a geometry. More...

#include <GeometryTypes.h>

Public Member Functions

bool operator== (const GeoLocation &other) const
 
bool operator!= (const GeoLocation &other) const
 

Public Attributes

GeometryType type {}
 The type of geometry location. More...
 
unsigned int index {}
 The index of the component this location relates to. More...
 
Bifrost::Math::uint4 sub_indices {}
 The sub-indices (up to four). For example, these may refer to the face vertices of a face. More...
 
Bifrost::Math::float4 sub_parameters {}
 The sub-parameters (up to four). For example, these may refer to weights corresponding to the sub_indices. More...
 
Amino::Ptr< Amino::Array< unsigned int > > aux_indices {Amino::PtrDefaultFlag{}}
 Auxillary array for any indices beyond the first four. More...
 
Amino::Ptr< Amino::Array< float > > aux_parameters {Amino::PtrDefaultFlag{}}
 Auxillary array for any parameters beyond the first four. More...
 

Detailed Description

Describes a location within, or on the surface of, a geometry.

The member variable names are intentionally generic, as this data type can describe locations on the surface of a mesh, or within a volume, or along a strand segment, or a particular point in a points geometry.

For meshes the interpretation of a GeoLocation is a weighted sum of the corners of a face within the mesh. The type member will be set to GeometryType::mesh. The index member is interpreted as a face index. The sub_indices will contain corner indices relative to the face. There are always at least three valid indices. The fourth may be set to Bifrost::Geometry::kInvalidIndex. The sub_parameters will contain weights for the corresponding sub_indices. If there are more than four sub_indices the remaining indices and corresponding weights will be stored in aux_indices and aux_weights respectively.

For strands the interpretation of a GeoLocation is a weighted sum of the points of a strand segment. The type member will be set to GeometryType::strand. The index member is interpreted as a strand index. The sub_indices will contain point indices relative to the strand. There are always two valid indices. The third and fourth may be set to kInvalidIndex. The sub_parameters will contain weights for the corresponding sub_indices.

For points the interpretation of a GeoLocation is a single point within the point cloud. The type member will be set to GeometryType::points. The index is interpreted as a point index. The other members are not used.

For volumes the interpretation of a GeoLocation is a position in local space. The type member will be set to GeometryType::volume. The sub_parameter member is interpreted as a local position in 3d space within the volume. The other members are not used.

Definition at line 118 of file GeometryTypes.h.

Member Function Documentation

◆ operator!=()

bool Bifrost::Geometry::Common::GeoLocation::operator!= ( const GeoLocation other) const
inline

Definition at line 149 of file GeometryTypes.h.

◆ operator==()

bool Bifrost::Geometry::Common::GeoLocation::operator== ( const GeoLocation other) const

Member Data Documentation

◆ aux_indices

Amino::Ptr<Amino::Array<unsigned int> > Bifrost::Geometry::Common::GeoLocation::aux_indices {Amino::PtrDefaultFlag{}}

Auxillary array for any indices beyond the first four.

Definition at line 140 of file GeometryTypes.h.

◆ aux_parameters

Amino::Ptr<Amino::Array<float> > Bifrost::Geometry::Common::GeoLocation::aux_parameters {Amino::PtrDefaultFlag{}}

Auxillary array for any parameters beyond the first four.

Definition at line 142 of file GeometryTypes.h.

◆ index

unsigned int Bifrost::Geometry::Common::GeoLocation::index {}

The index of the component this location relates to.

Definition at line 124 of file GeometryTypes.h.

◆ sub_indices

Bifrost::Math::uint4 Bifrost::Geometry::Common::GeoLocation::sub_indices {}

The sub-indices (up to four). For example, these may refer to the face vertices of a face.

Definition at line 128 of file GeometryTypes.h.

◆ sub_parameters

Bifrost::Math::float4 Bifrost::Geometry::Common::GeoLocation::sub_parameters {}

The sub-parameters (up to four). For example, these may refer to weights corresponding to the sub_indices.

Definition at line 132 of file GeometryTypes.h.

◆ type

GeometryType Bifrost::Geometry::Common::GeoLocation::type {}

The type of geometry location.

Definition at line 121 of file GeometryTypes.h.