Free Electron
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
fe::ext::SurfaceBase Class Reference

Trivial Point Origin Surface. More...

#include <SurfaceBase.h>

Inheritance diagram for fe::ext::SurfaceBase:
Inheritance graph
[legend]

Public Member Functions

virtual void protect (void)
 
virtual void bind (Instance a_instance)
 associate with model data More...
 
virtual SpatialVector center (void)
 
virtual SpatialVector center (void) const
 
virtual Real radius (void)
 
virtual Real radius (void) const
 
virtual Color diffuse (void) const
 Return the diffuse color. More...
 
virtual void setSampleMethod (SampleMethod a_sampleMethod)
 
virtual void setNodeName (String a_nodeName)
 
virtual String nodeName (void) const
 
virtual void setRestrictions (Restrictions a_restrictions)
 
virtual Restrictions restrictions (void) const
 
virtual void setRefinement (U32 a_refinement)
 Set limitation of surface improvement, such as subdivision. More...
 
virtual void setAccuracy (SurfaceI::Accuracy a_accuracy)
 Set what primitive to search down to. More...
 
virtual void setSearchable (BWORD a_searchable)
 Set whether this surface may be searched. More...
 
virtual void setSearch (String a_searchName)
 Set component to use for searching. More...
 
virtual void setTriangulation (Triangulation a_triangulation)
 Set how 4+ vertex polygons break down. More...
 
virtual I32 triangleCount (void)
 Number of barycentric elements. More...
 
virtual SpatialTransform sample (Vector2 a_uv)
 
virtual SpatialTransform sample (Vector2 a_uv) const
 
virtual SpatialTransform sample (I32 a_triangleIndex, SpatialBary a_barycenter)
 
virtual SpatialTransform sample (I32 a_triangleIndex, SpatialBary a_barycenter) const
 
virtual SpatialTransform sample (I32 a_triangleIndex, SpatialBary a_barycenter, SpatialVector a_tangent) const
 
virtual sp< ImpactIsampleImpact (I32 a_triangleIndex, SpatialBary a_barycenter)
 
virtual sp< ImpactIsampleImpact (I32 a_triangleIndex, SpatialBary a_barycenter) const
 
virtual sp< ImpactIsampleImpact (I32 a_triangleIndex, SpatialBary a_barycenter, SpatialVector a_tangent) const
 
virtual SpatialVector samplePoint (const SpatialTransform &a_transform, Vector2 a_uv)
 
virtual SpatialVector samplePoint (Vector2 a_uv)
 
virtual SpatialVector samplePoint (const SpatialTransform &a_transform, Vector2 a_uv) const
 
virtual SpatialVector samplePoint (Vector2 a_uv) const
 
virtual SpatialVector sampleNormal (const SpatialTransform &a_transform, Vector2 a_uv)
 
virtual SpatialVector sampleNormal (Vector2 a_uv)
 
virtual SpatialVector sampleNormal (const SpatialTransform &a_transform, Vector2 a_uv) const
 
virtual SpatialVector sampleNormal (Vector2 a_uv) const
 
virtual void prepareForSample (void)
 
virtual void prepareForSearch (void)
 
virtual void prepareForUVSearch (void)
 
virtual Containment containment (const SpatialVector &a_origin)
 
virtual Containment containment (const SpatialVector &a_origin) const
 
virtual sp< ImpactInearestPoint (const SpatialTransform &a_transform, const SpatialVector &a_origin, Real a_maxDistance)
 
virtual sp< ImpactInearestPoint (const SpatialVector &a_origin, Real a_maxDistance, BWORD a_anyHit)
 
virtual sp< ImpactInearestPoint (const SpatialVector &a_origin, Real a_maxDistance)
 
virtual sp< ImpactInearestPoint (const SpatialVector &a_origin)
 
virtual sp< ImpactInearestPoint (const Vector2 &a_uv)
 
virtual sp< ImpactInearestPoint (const SpatialTransform &a_transform, const SpatialVector &a_origin, Real a_maxDistance) const
 
virtual sp< ImpactInearestPoint (const SpatialVector &a_origin, Real a_maxDistance, BWORD a_anyHit) const
 
virtual sp< ImpactInearestPoint (const SpatialVector &a_origin, Real a_maxDistance) const
 
virtual sp< ImpactInearestPoint (const SpatialVector &a_origin) const
 
virtual sp< ImpactInearestPoint (const Vector2 &a_uv) const
 
virtual Array< sp< SurfaceI::ImpactI > > nearestPoints (const Vector2 &a_uv, Real a_maxDistance, U32 a_hitLimit)
 
virtual Array< sp< SurfaceI::ImpactI > > nearestPoints (const Vector2 &a_uv, Real a_maxDistance, U32 a_hitLimit) const
 
virtual Array< sp< SurfaceI::ImpactI > > nearestPoints (const SpatialVector &a_origin, Real a_maxDistance, U32 a_hitLimit)
 
virtual Array< sp< SurfaceI::ImpactI > > nearestPoints (const SpatialVector &a_origin, Real a_maxDistance, U32 a_hitLimit) const
 
virtual Array< sp< SurfaceI::ImpactI > > nearestPoints (const SpatialVector &a_origin, Real a_maxDistance, U32 a_hitLimit, sp< PartitionI > a_spPartition)
 
virtual Array< sp< SurfaceI::ImpactI > > nearestPoints (const SpatialVector &a_origin, Real a_maxDistance, U32 a_hitLimit, sp< PartitionI > a_spPartition) const
 
virtual sp< ImpactIrayImpact (const SpatialTransform &a_transform, const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit)
 
virtual sp< ImpactIrayImpact (const SpatialTransform &a_transform, const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit) const
 
virtual sp< ImpactIrayImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit)
 
virtual sp< ImpactIrayImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit) const
 
virtual sp< ImpactIrayImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance)
 
virtual sp< ImpactIrayImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance) const
 
virtual Array< sp< SurfaceI::ImpactI > > rayImpacts (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, U32 a_hitLimit)
 
virtual Array< sp< SurfaceI::ImpactI > > rayImpacts (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, U32 a_hitLimit) const
 
virtual sp< ImpactIconeImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, Real a_coneAngle, sp< DrawI > a_spDrawI)
 
virtual sp< ImpactIconeImpact (const SpatialTransform &a_transform, const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, Real a_coneAngle, sp< DrawI > a_spDrawI)
 
virtual sp< ImpactIcapsuleImpact (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)
 
virtual sp< ImpactIcapsuleImpact (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)
 
virtual sp< GaugeIgauge (void)
 
virtual void partitionWith (String a_attributeName)
 
virtual U32 partitionCount (void) const
 
virtual String partitionName (U32 a_index) const
 
virtual Vector4 partitionSphere (U32 a_index) const
 
virtual I32 setPartitionFilter (String a_filterString)
 
virtual I32 setPartitionFilter (String a_filterString, PartitionI::FilterMethod a_filterMethod)
 
virtual sp< PartitionIcreatePartition (void)
 
virtual void draw (sp< DrawI > a_spDrawI, const fe::Color *a_pColor)
 Draw with current settings. More...
 
virtual void draw (sp< DrawI > a_spDrawI, const fe::Color *a_pColor) const
 
virtual void draw (const SpatialTransform &a_transform, sp< DrawI > a_spDrawI, const fe::Color *a_pColor)
 
virtual void draw (const SpatialTransform &a_transform, sp< DrawI > a_spDrawI, const fe::Color *a_pColor) const
 
virtual void draw (const SpatialTransform &a_transform, sp< DrawI > a_spDrawI, const fe::Color *a_pColor, sp< DrawBufferI > a_spDrawBuffer, sp< PartitionI > a_spPartition)
 
virtual void draw (const SpatialTransform &a_transform, sp< DrawI > a_spDrawI, const fe::Color *a_pColor, sp< DrawBufferI > a_spDrawBuffer, sp< PartitionI > a_spPartition) const
 
virtual void bind (Record &rRecord)
 
- Public Member Functions inherited from fe::Component
const Stringname (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< Registryregistry (void) const
 Get the Registry that created this component. More...
 
void adjoin (sp< Component > spComponent)
 Tie this component's lifetime to another. More...
 
sp< Componentcreate (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< Librarylibrary (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 unprotect (void)
 
virtual Protectableclone (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)
 
- Public Member Functions inherited from fe::ext::SurfaceI
virtual void setSampleMethod (SampleMethod a_sampleMethod)=0
 

Protected Member Functions

sp< ImpactIshootRay (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, BWORD a_anyHit, sp< ImpactI > a_spLastImpact)
 
sp< ImpactItubeImpact (const SpatialVector &a_origin, const SpatialVector &a_direction, Real a_maxDistance, Real a_radius0, Real a_radius1, BWORD a_anyHit, sp< DrawI > a_spDrawI, sp< ImpactI > a_spLastImpact)
 
virtual void cache (void)
 
virtual void checkCache (void)
 
- 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)
 

Static Protected Member Functions

static void drawHit (sp< DrawI > a_spDrawI, SpatialVector a_center, Real a_radius, Color a_color)
 

Protected Attributes

BWORD m_cached
 
SampleMethod m_sampleMethod
 
String m_nodeName
 
Restrictions m_restrictions
 

Additional Inherited Members

- Public Types inherited from fe::ext::SurfaceI
enum  SampleMethod {
  e_flat,
  e_linear,
  e_pointNormal,
  e_spline
}
 
enum  Containment {
  e_unknown,
  e_inside,
  e_outside
}
 
enum  Accuracy {
  e_sphere,
  e_triangle
}
 
enum  Triangulation {
  e_existingPoints,
  e_balanced
}
 
enum  Restrictions {
  e_unrestricted = 0x0,
  e_excludeCurves = 0x1,
  e_excludePolygons = 0x2
}
 
- 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 *)
 

Detailed Description

Trivial Point Origin Surface.

Member Function Documentation

◆ bind()

virtual void fe::ext::SurfaceBase::bind ( Instance  a_instance)
inlinevirtual

associate with model data

Implements fe::ext::SurfaceI.

Reimplemented in fe::ext::SurfaceVDB.

◆ diffuse()

virtual Color fe::ext::SurfaceBase::diffuse ( void  ) const
inlinevirtual

Return the diffuse color.

Implements fe::ext::SurfaceI.

Reimplemented in fe::ext::SurfaceSphere.

◆ draw()

virtual void fe::ext::SurfaceBase::draw ( sp< DrawI a_spDrawI,
const fe::Color a_pColor 
)
inlinevirtual

Draw with current settings.

const versions do not permit caching.

Implements fe::ext::DrawableI.

◆ setAccuracy()

virtual void fe::ext::SurfaceBase::setAccuracy ( SurfaceI::Accuracy  a_accuracy)
inlinevirtual

Set what primitive to search down to.

Using sphere accuracy will only resolve to the lowest bounding sphere.

Implements fe::ext::SurfaceI.

Reimplemented in fe::ext::SurfaceSearchable.

◆ setRefinement()

virtual void fe::ext::SurfaceBase::setRefinement ( U32  a_refinement)
inlinevirtual

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.

Implements fe::ext::SurfaceI.

Reimplemented in fe::ext::SurfaceSearchable.

◆ setSearch()

virtual void fe::ext::SurfaceBase::setSearch ( String  a_searchName)
inlinevirtual

Set component to use for searching.

This is presumed to be an implementation of SpatialTreeI. Leave blank for default.

Implements fe::ext::SurfaceI.

Reimplemented in fe::ext::SurfaceSearchable.

◆ setSearchable()

virtual void fe::ext::SurfaceBase::setSearchable ( BWORD  a_searchable)
inlinevirtual

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.

Implements fe::ext::SurfaceI.

Reimplemented in fe::ext::SurfaceSearchable.

◆ setTriangulation()

virtual void fe::ext::SurfaceBase::setTriangulation ( Triangulation  a_triangulation)
inlinevirtual

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.

Implements fe::ext::SurfaceI.

Reimplemented in fe::ext::SurfaceTriangles.

◆ triangleCount()

virtual I32 fe::ext::SurfaceBase::triangleCount ( void  )
inlinevirtual

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.

Implements fe::ext::SurfaceI.

Reimplemented in fe::ext::SurfaceSearchable.


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