Free Electron
|
Spatial boundary. More...
#include <SurfaceI.h>
Classes | |
class | GaugeI |
calculate surface distances More... | |
class | ImpactI |
results of a surface intersection More... | |
Public Member Functions | |
virtual void | bind (Instance a_instance)=0 |
associate with model data More... | |
virtual void | setSampleMethod (SampleMethod a_sampleMethod)=0 |
virtual void | setNodeName (String a_nodeName)=0 |
virtual String | nodeName (void) const =0 |
virtual void | setRestrictions (Restrictions a_restrictions)=0 |
virtual Restrictions | restrictions (void) const =0 |
virtual void | setRefinement (U32 a_refinement)=0 |
Set limitation of surface improvement, such as subdivision. More... | |
virtual void | setAccuracy (Accuracy a_accuracy)=0 |
Set what primitive to search down to. More... | |
virtual void | setSearchable (BWORD a_searchable)=0 |
Set whether this surface may be searched. More... | |
virtual void | setSearch (String a_searchName)=0 |
Set component to use for searching. More... | |
virtual void | setTriangulation (Triangulation a_triangulation)=0 |
Set how 4+ vertex polygons break down. More... | |
virtual I32 | triangleCount (void)=0 |
Number of barycentric elements. More... | |
virtual Color | diffuse (void) const =0 |
Return the diffuse color. More... | |
virtual Containment | containment (const SpatialVector &a_origin)=0 |
virtual Containment | containment (const SpatialVector &a_origin) const =0 |
virtual sp< GaugeI > | gauge (void)=0 |
virtual void | partitionWith (String a_attributeName)=0 |
virtual U32 | partitionCount (void) const =0 |
virtual String | partitionName (U32 a_index) const =0 |
virtual Vector4 | partitionSphere (U32 a_index) const =0 |
virtual I32 | setPartitionFilter (String a_filterString)=0 |
virtual I32 | setPartitionFilter (String a_filterString, PartitionI::FilterMethod a_filterMethod)=0 |
virtual sp< PartitionI > | createPartition (void)=0 |
Return the bounding center | |
virtual SpatialVector | center (void)=0 |
virtual SpatialVector | center (void) const =0 |
Return the bounding radius | |
virtual Real | radius (void)=0 |
virtual Real | radius (void) const =0 |
Sample local transform on surface | |
The notion of u and v may have limited sense on some surface types. The full domain of u and v may not reach the full range of some surfaces. An implemention is permitted clamp u or v to the range 0 to 1, but may choose to extrapolate in one or both axes. The const version does not permit caching. | |
virtual SpatialTransform | sample (Vector2 a_uv)=0 |
virtual SpatialTransform | sample (Vector2 a_uv) const =0 |
Sample local transform on a surface face | |
Surfaces that don't have faces may simply return identity. An implemention is permitted clamp the barycentric coordinates to the range 0 to 1, but may choose to extrapolate instead. The const version does not permit caching. | |
virtual SpatialTransform | sample (I32 a_triangleIndex, SpatialBary a_barycenter)=0 |
virtual SpatialTransform | sample (I32 a_triangleIndex, SpatialBary a_barycenter) const =0 |
virtual SpatialTransform | sample (I32 a_triangleIndex, SpatialBary a_barycenter, SpatialVector a_tangent) const =0 |
Sample surface face as ImpactI | |
This method is similar to sample(), but populates an ImpactI. Not all value may be populated. The const version does not permit caching. | |
virtual sp< ImpactI > | sampleImpact (I32 a_triangleIndex, SpatialBary a_barycenter)=0 |
virtual sp< ImpactI > | sampleImpact (I32 a_triangleIndex, SpatialBary a_barycenter) const =0 |
virtual sp< ImpactI > | sampleImpact (I32 a_triangleIndex, SpatialBary a_barycenter, SpatialVector a_tangent) const =0 |
Sample location on surface | |
An implemention may just use the translation from the result of sample(), but is encouraged to provide a more efficient limited evaluation, if reasonable. The const version does not permit caching. | |
virtual SpatialVector | samplePoint (const SpatialTransform &a_transform, Vector2 a_uv)=0 |
virtual SpatialVector | samplePoint (Vector2 a_uv)=0 |
virtual SpatialVector | samplePoint (const SpatialTransform &a_transform, Vector2 a_uv) const =0 |
virtual SpatialVector | samplePoint (Vector2 a_uv) const =0 |
Sample direction from surface | |
An implemention may just use the up vector from the result of sample(), but is encouraged to provide a more efficient limited evaluation, if reasonable. The const version does not permit caching. | |
virtual SpatialVector | sampleNormal (const SpatialTransform &a_transform, Vector2 a_uv)=0 |
virtual SpatialVector | sampleNormal (Vector2 a_uv)=0 |
virtual SpatialVector | sampleNormal (const SpatialTransform &a_transform, Vector2 a_uv) const =0 |
virtual SpatialVector | sampleNormal (Vector2 a_uv) const =0 |
Build data required for searching | |
This may need to be called at least once before using a const version of nearestPoint or rayImpact. The non-const versions will call it automatically. | |
virtual void | prepareForSample (void)=0 |
virtual void | prepareForSearch (void)=0 |
virtual void | prepareForUVSearch (void)=0 |
Find the closest point(s) on the surface from given point | |
Surfaces are not required to support point searches. Any surface is allowed to return a NULL ImpactI. const versions do not permit caching. | |
virtual sp< ImpactI > | nearestPoint (const SpatialTransform &a_transform, const SpatialVector &a_point, Real a_maxDistance)=0 |
virtual sp< ImpactI > | nearestPoint (const SpatialTransform &a_transform, const SpatialVector &a_point, Real a_maxDistance) const =0 |
virtual sp< ImpactI > | nearestPoint (const SpatialVector &a_point, Real a_maxDistance, BWORD a_anyHit)=0 |
virtual sp< ImpactI > | nearestPoint (const SpatialVector &a_point, Real a_maxDistance, BWORD a_anyHit) const =0 |
virtual sp< ImpactI > | nearestPoint (const SpatialVector &a_point, Real a_maxDistance)=0 |
virtual sp< ImpactI > | nearestPoint (const SpatialVector &a_point, Real a_maxDistance) const =0 |
virtual sp< ImpactI > | nearestPoint (const SpatialVector &a_point)=0 |
virtual sp< ImpactI > | nearestPoint (const SpatialVector &a_point) const =0 |
virtual sp< ImpactI > | nearestPoint (const Vector2 &a_uv)=0 |
virtual sp< ImpactI > | nearestPoint (const Vector2 &a_uv) const =0 |
virtual Array< sp< SurfaceI::ImpactI > > | nearestPoints (const Vector2 &a_uv, Real a_maxDistance, U32 a_hitLimit)=0 |
virtual Array< sp< SurfaceI::ImpactI > > | nearestPoints (const Vector2 &a_uv, Real a_maxDistance, U32 a_hitLimit) const =0 |
virtual Array< sp< SurfaceI::ImpactI > > | nearestPoints (const SpatialVector &a_origin, Real a_maxDistance, U32 a_hitLimit)=0 |
virtual Array< sp< SurfaceI::ImpactI > > | nearestPoints (const SpatialVector &a_origin, Real a_maxDistance, U32 a_hitLimit) const =0 |
virtual Array< sp< SurfaceI::ImpactI > > | nearestPoints (const SpatialVector &a_origin, Real a_maxDistance, U32 a_hitLimit, sp< PartitionI > a_spPartition)=0 |
virtual Array< sp< SurfaceI::ImpactI > > | nearestPoints (const SpatialVector &a_origin, Real a_maxDistance, U32 a_hitLimit, sp< PartitionI > a_spPartition) const =0 |
Trace distance(s) to surface in given direction from the originating point | |
Surfaces are not required to support ray casting. Any surface is allowed to return a NULL ImpactI. const versions do not permit caching. | |
virtual sp< ImpactI > | rayImpact (const SpatialTransform &a_transform, const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit)=0 |
virtual sp< ImpactI > | rayImpact (const SpatialTransform &a_transform, const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit) const =0 |
virtual sp< ImpactI > | rayImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit)=0 |
virtual sp< ImpactI > | rayImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit) const =0 |
virtual sp< ImpactI > | rayImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance)=0 |
virtual sp< ImpactI > | rayImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance) const =0 |
virtual Array< sp< SurfaceI::ImpactI > > | rayImpacts (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, U32 a_hitLimit)=0 |
virtual Array< sp< SurfaceI::ImpactI > > | rayImpacts (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, U32 a_hitLimit) const =0 |
virtual sp< ImpactI > | coneImpact (const SpatialTransform &a_transform, const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, Real a_coneAngle, sp< DrawI > a_spDrawI)=0 |
virtual sp< ImpactI > | coneImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, Real a_coneAngle, sp< DrawI > a_spDrawI)=0 |
virtual sp< ImpactI > | capsuleImpact (const SpatialTransform &a_transform, const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, Real a_radius, BWORD a_anyHit, sp< DrawI > a_spDrawI, sp< ImpactI > a_spLastImpact)=0 |
virtual sp< ImpactI > | capsuleImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, Real a_radius, BWORD a_anyHit, sp< DrawI > a_spDrawI, sp< ImpactI > a_spLastImpact)=0 |
Public Member Functions inherited from fe::Component | |
const String & | name (void) const |
Return the components chosen name. More... | |
const String | verboseName (void) const |
Return the annotated chosen name. More... | |
void | setName (const String &name) |
Rename the component to anything you want. More... | |
hp< Registry > | registry (void) const |
Get the Registry that created this component. More... | |
void | adjoin (sp< Component > spComponent) |
Tie this component's lifetime to another. More... | |
sp< Component > | create (const String &implementation, BWORD quiet=FALSE) const |
Convienience function to registry()->create() More... | |
void | disjoin (void) |
Untie component from Hub, if connected. More... | |
String | factoryName (void) |
void | setLibrary (sp< Library > spLibrary) |
Store a reference to the library used to instantiate this component. More... | |
sp< Library > | library (void) |
Get the library that created the component. More... | |
void | setFactoryIndex (I32 a_factoryIndex) |
Set the library's factory index. More... | |
I32 | factoryIndex (void) |
Get the library's factory index. More... | |
void | setSingleton (BWORD set) |
Specify whether component is a singleton. More... | |
BWORD | isSingleton (void) |
Return whether component is a singleton. More... | |
virtual void | acquire (void) |
Specialized reference increment. More... | |
virtual void | release (void) |
Specialized reference decrement. More... | |
Public Member Functions inherited from fe::Handled< Component > | |
const hp< Component > & | getHandle (void) const |
Get a safe handle to this object. More... | |
Public Member Functions inherited from fe::Protectable | |
virtual I32 | protection (void) const |
virtual void | protect (void) |
virtual void | unprotect (void) |
virtual Protectable * | clone (Protectable *pInstance=NULL) |
Public Member Functions inherited from fe::Counted | |
virtual void | acquire (int &rCount) |
Increment the reference count (and get the count) More... | |
virtual void | abandon (void) |
Decrement the reference count. More... | |
int | count (void) const |
Return the count of references. More... | |
void | setName (const String &) |
void | trackReference (void *pReference, String what) |
void | untrackReference (void *pReference) |
void | registerRegion (void *pT, U32 bytes) |
Public Member Functions inherited from fe::Initialized | |
void | initializeAll (void) |
void | setActive (bool a_active) |
Additional Inherited Members | |
Static Public Member Functions inherited from fe::Counted | |
static String | reportTracker (void) |
static U32 | trackerCount (void) |
Protected Types inherited from fe::Initialized | |
typedef void(* | InitializeFunction) (Initialized *) |
Protected Member Functions inherited from fe::Handled< Component > | |
void | abandonHandle (void) |
Protected Member Functions inherited from fe::Counted | |
int | releaseInternal (void) |
Decrement the reference count. More... | |
void | suppressReport (void) |
Protected Member Functions inherited from fe::Initialized | |
void | addInitializer (InitializeFunction function) |
Related Functions inherited from fe::Component | |
FE_DL_EXPORT void FE_CDECL | checkUnload (sp< Library > &pLibrary, Component *pComponent=NULL) |
Delete the component and unload libraries where appropriate. More... | |
Spatial boundary.
|
pure virtual |
associate with model data
Implemented in fe::ext::SurfaceBase, and fe::ext::SurfaceVDB.
|
pure virtual |
Return the diffuse color.
Implemented in fe::ext::SurfaceBase, and fe::ext::SurfaceSphere.
|
pure virtual |
Set what primitive to search down to.
Using sphere accuracy will only resolve to the lowest bounding sphere.
Implemented in fe::ext::SurfaceSearchable, and fe::ext::SurfaceBase.
|
pure virtual |
Set limitation of surface improvement, such as subdivision.
Refinement may be fixed or adaptive and is not necessarily uniformly applied.
Some surfaces may ignore this setting.
Implemented in fe::ext::SurfaceSearchable, and fe::ext::SurfaceBase.
|
pure virtual |
Set component to use for searching.
This is presumed to be an implementation of SpatialTreeI. Leave blank for default.
Implemented in fe::ext::SurfaceSearchable, and fe::ext::SurfaceBase.
|
pure virtual |
Set whether this surface may be searched.
Turning this off may allow some implementations to make optimization.
An implemention is permitted to remain searchable regardless.
Implemented in fe::ext::SurfaceSearchable, and fe::ext::SurfaceBase.
|
pure virtual |
Set how 4+ vertex polygons break down.
Using balanced triangulation may add new points that did not already exist on the mesh.
Some implementations may drop 5+ vertex polygons.
Implemented in fe::ext::SurfaceBase, and fe::ext::SurfaceTriangles.
|
pure virtual |
Number of barycentric elements.
Use this for barycentric sampling. For surfaces converted into triangles, this is the number of triangle. For curves, this is really the curve count. If unknown, an implementation may return -1.
Implemented in fe::ext::SurfaceSearchable, and fe::ext::SurfaceBase.