Sirikata
|
Classes | |
struct | Billboard |
class | CompositeFilter |
A CompositeFilter is essentially a pipeline of other filters. More... | |
class | FilterData |
FilterData is the input and output of a Filter. More... | |
class | Filter |
class | FilterFactory |
struct | SkinController |
Represents a skinned animation. More... | |
struct | SubMeshGeometry |
struct | GeometryInstance |
struct | LightInstance |
struct | MaterialEffectInfo |
struct | InstanceSkinAnimation |
struct | TransformationKeyFrames |
Represents a series of key frames. More... | |
struct | Node |
struct | ProgressiveMipmapLevel |
struct | ProgressiveMipmapArchive |
struct | ProgressiveData |
struct | Meshdata |
class | MeshSimplifier |
class | Visual |
Base class for visual objects that are passed through the system. More... | |
class | CenterFilter |
class | ComputeBoundsFilter |
class | ComputeNormalsFilter |
For meshes that don't already specify them, fills in normals computed based on winding order. More... | |
class | DeduplicationFilter |
class | LoadFilter |
class | PrintFilter |
class | SaveFilter |
class | SingleMaterialGeometryFilter |
Splits any SubMeshGeometries (and corresponding GeometryInstances) into multiple parts, such that each SubMeshGeometry only has a single material (and the GeometryInstance has only 1 entry in its MaterialBindingMap). More... | |
class | SquashInstancedGeometryFilter |
Takes all instanced geometry in a mesh and squashes it to as few SubMeshGeometry/InstanceGeometries as possible. More... | |
class | SquashMaterialsFilter |
class | SquashPrimitivesFilter |
class | TransformFilter |
class | TriangulateFilter |
TriangulateFilter converts non-triangulated meshes, e.g. More... | |
class | CompressTexturesFilter |
class | TextureAtlasFilter |
class | IndexedFaceContainer |
class | FaceContainer |
class | GeomContainer |
class | GeomPairContainer |
Typedefs | |
typedef std::tr1::shared_ptr < Billboard > | BillboardPtr |
typedef std::tr1::weak_ptr < Billboard > | BillboardWPtr |
typedef std::tr1::shared_ptr < const FilterData > | FilterDataPtr |
typedef std::tr1::shared_ptr < FilterData > | MutableFilterDataPtr |
typedef std::tr1::shared_ptr < Filter > | FilterPtr |
typedef int32 | NodeIndex |
typedef std::vector< NodeIndex > | NodeIndexList |
typedef std::vector< LightInfo > | LightInfoList |
typedef std::vector< std::string > | TextureList |
typedef std::tr1::shared_ptr < Meshdata > | MeshdataPtr |
typedef std::tr1::weak_ptr < Meshdata > | MeshdataWPtr |
typedef std::vector < SkinController > | SkinControllerList |
typedef std::vector < SubMeshGeometry > | SubMeshGeometryList |
typedef std::vector < GeometryInstance > | GeometryInstanceList |
typedef std::vector < LightInstance > | LightInstanceList |
typedef std::vector < MaterialEffectInfo > | MaterialEffectInfoList |
typedef std::vector< Node > | NodeList |
typedef std::map< uint32, ProgressiveMipmapLevel > | ProgressiveMipmaps |
typedef std::map< std::string, ProgressiveMipmapArchive > | ProgressiveMipmapMap |
typedef std::tr1::shared_ptr < ProgressiveData > | ProgressiveDataPtr |
typedef std::tr1::shared_ptr < Visual > | VisualPtr |
typedef std::tr1::weak_ptr < Visual > | VisualWPtr |
Functions | |
SIRIKATA_MESH_FUNCTION_EXPORT void | ComputeBounds (VisualPtr visual, BoundingBox3f3f *bbox=NULL, double *rad=NULL) |
Compute the bounds of the visual. | |
SIRIKATA_MESH_FUNCTION_EXPORT void | ComputeBounds (VisualPtr visual, const Matrix4x4f &xform, BoundingBox3f3f *bbox=NULL, double *rad=NULL) |
Compute the bounds of the visual when trasnformed by xform. | |
SIRIKATA_MESH_FUNCTION_EXPORT void | ComputeBounds (MeshdataPtr mesh, BoundingBox3f3f *bbox=NULL, double *rad=NULL) |
Compute the bounds of the mesh. | |
SIRIKATA_MESH_FUNCTION_EXPORT void | ComputeBounds (MeshdataPtr mesh, const Matrix4x4f &xform, BoundingBox3f3f *bbox=NULL, double *rad=NULL) |
Compute the bounds of the mesh when trasnformed by xform. | |
SIRIKATA_MESH_FUNCTION_EXPORT void | ComputeBounds (BillboardPtr billboard, BoundingBox3f3f *bbox=NULL, double *rad=NULL) |
Compute the bounds of the billboard. | |
SIRIKATA_MESH_FUNCTION_EXPORT void | ComputeBounds (BillboardPtr billboard, const Matrix4x4f &xform, BoundingBox3f3f *bbox=NULL, double *rad=NULL) |
Compute the bounds of the mesh when trasnformed by xform. | |
SIRIKATA_MESH_FUNCTION_EXPORT bool | Raytrace (VisualPtr vis, const Matrix4x4f &vis_xform, const Vector3f &ray_start, const Vector3f &ray_dir, float32 *t_out, Vector3f *hit_out) |
Traces a ray an returns information about the first point it hits on an the mesh. | |
SIRIKATA_MESH_FUNCTION_EXPORT bool | RaytraceType (MeshdataPtr vis, const Matrix4x4f &vis_xform, const Vector3f &ray_start, const Vector3f &ray_dir, float32 *t_out, Vector3f *hit_out) |
SIRIKATA_MESH_FUNCTION_EXPORT bool | RaytraceType (BillboardPtr vis, const Matrix4x4f &vis_xform, const Vector3f &ray_start, const Vector3f &ray_dir, float32 *t_out, Vector3f *hit_out) |
Filter * | ReduceDrawCalls (const String &args) |
bool | comp (Vector3f point1, Vector3f point2) |
Filter * | AtlasAndReduceDrawCalls (const String &args) |
bool | custom_isnan (double data) |
bool | optimize (Matrix4x4d &Q, const Vector3f &v11, const Vector3f &v21, Vector3f &best) |
void | computeCosts (Mesh::MeshdataPtr agg_mesh, std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, Matrix4x4d > > &submeshPositionQs, std::set< GeomPairContainer > &vertexPairs, std::tr1::unordered_map< GeomPairContainer, float64, GeomPairContainer::Hasher > &pairPriorities, std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, std::tr1::unordered_set< uint32 > > > &submeshNeighborVertices, std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, std::vector< uint32 > > > &vertexToFacesMap, std::tr1::unordered_map< GeomPairContainer, uint32, GeomPairContainer::Hasher > &pairFrequency) |
uint32 | findMappedVertex (std::tr1::unordered_map< int, int > &vertexMapping, uint32 idx) |
void | computeCosts (Mesh::MeshdataPtr agg_mesh, uint32 geomIdx, uint32 sourcePositionIdx, uint32 targetPositionIdx, std::tr1::unordered_map< int, int > &vertexMapping, std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, Matrix4x4d > > &submeshPositionQs, std::set< GeomPairContainer > &vertexPairs, std::tr1::unordered_map< GeomPairContainer, float64, GeomPairContainer::Hasher > &pairPriorities, std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, std::tr1::unordered_set< uint32 > > > &submeshNeighborVertices, std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, std::vector< uint32 > > > &vertexToFacesMap, std::tr1::unordered_map< GeomPairContainer, uint32, GeomPairContainer::Hasher > &pairFrequency) |
bool | RaytraceTriangle (const Vector3f &v1, const Vector3f &v2, const Vector3f &v3, const Vector3f &normal, const Vector3f &ray_start, const Vector3f &ray_dir, bool positive_side, bool negative_side, float32 *t_out) |
Raytraces a single triangle. | |
bool | RaytraceSphere (const Vector3f ¢er, float32 radius, const Vector3f &ray_start, const Vector3f &ray_dir, bool discard_inside, float32 *t_out) |
Raytraces a sphere. | |
bool | RaytraceTriangle (const Vector3f &v1, const Vector3f &v2, const Vector3f &v3, const Vector3f &ray_start, const Vector3f &ray_dir, float32 *t_out) |
Raytraces a single triangle. | |
bool | RaytraceSphere (const Vector3f ¢er, float32 radius, const Vector3f &ray_start, const Vector3f &ray_dir, float32 *t_out) |
Raytraces a sphere. | |
Variables | |
SIRIKATA_MESH_EXPORT NodeIndex | NullNodeIndex = -1 |
typedef std::tr1::shared_ptr<Billboard> Sirikata::Mesh::BillboardPtr |
typedef std::tr1::weak_ptr<Billboard> Sirikata::Mesh::BillboardWPtr |
typedef std::tr1::shared_ptr<const FilterData> Sirikata::Mesh::FilterDataPtr |
typedef std::tr1::shared_ptr<Filter> Sirikata::Mesh::FilterPtr |
typedef std::vector<GeometryInstance> Sirikata::Mesh::GeometryInstanceList |
typedef std::vector<LightInfo> Sirikata::Mesh::LightInfoList |
typedef std::vector<LightInstance> Sirikata::Mesh::LightInstanceList |
typedef std::vector<MaterialEffectInfo> Sirikata::Mesh::MaterialEffectInfoList |
typedef std::tr1::shared_ptr<Meshdata> Sirikata::Mesh::MeshdataPtr |
typedef std::tr1::weak_ptr<Meshdata> Sirikata::Mesh::MeshdataWPtr |
typedef std::tr1::shared_ptr<FilterData> Sirikata::Mesh::MutableFilterDataPtr |
typedef int32 Sirikata::Mesh::NodeIndex |
typedef std::vector<NodeIndex> Sirikata::Mesh::NodeIndexList |
typedef std::vector<Node> Sirikata::Mesh::NodeList |
typedef std::tr1::shared_ptr<ProgressiveData> Sirikata::Mesh::ProgressiveDataPtr |
typedef std::map<std::string, ProgressiveMipmapArchive> Sirikata::Mesh::ProgressiveMipmapMap |
typedef std::map<uint32, ProgressiveMipmapLevel> Sirikata::Mesh::ProgressiveMipmaps |
typedef std::vector<SkinController> Sirikata::Mesh::SkinControllerList |
typedef std::vector<SubMeshGeometry> Sirikata::Mesh::SubMeshGeometryList |
typedef std::vector<std::string> Sirikata::Mesh::TextureList |
typedef std::tr1::shared_ptr<Visual> Sirikata::Mesh::VisualPtr |
typedef std::tr1::weak_ptr<Visual> Sirikata::Mesh::VisualWPtr |
bool Sirikata::Mesh::comp | ( | Vector3f | point1, |
Vector3f | point2 | ||
) |
Referenced by Sirikata::Mesh::DeduplicationFilter::apply().
void SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::ComputeBounds | ( | VisualPtr | visual, |
BoundingBox3f3f * | bbox = NULL , |
||
double * | rad = NULL |
||
) |
Compute the bounds of the visual.
Referenced by Sirikata::Mesh::ComputeBoundsFilter::apply(), ComputeBounds(), Sirikata::BulletObject::computeCollisionShape(), Sirikata::AggregateManager::generateAggregateMeshAsync(), Sirikata::Graphics::Entity::loadMesh(), Sirikata::JS::JSPositionListener::meshBounds(), Sirikata::JS::JSPositionListener::raytrace(), and Sirikata::JS::JSPositionListener::untransformedMeshBounds().
void SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::ComputeBounds | ( | MeshdataPtr | mesh, |
const Matrix4x4f & | xform, | ||
BoundingBox3f3f * | bbox = NULL , |
||
double * | rad = NULL |
||
) |
Compute the bounds of the mesh when trasnformed by xform.
The bounding box is computed *after* transforming the mesh, so it is tighter than computing the bounding box of the transformed original bounding box.
References Sirikata::Mesh::GeometryInstance::computeTransformedBounds(), and Sirikata::Mesh::Meshdata::GeometryInstanceIterator::next().
void SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::ComputeBounds | ( | VisualPtr | visual, |
const Matrix4x4f & | xform, | ||
BoundingBox3f3f * | bbox = NULL , |
||
double * | rad = NULL |
||
) |
Compute the bounds of the visual when trasnformed by xform.
The bounding box is computed *after* transforming the visual, so it is tighter than computing the bounding box of the transformed original bounding box.
References ComputeBounds().
void SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::ComputeBounds | ( | BillboardPtr | billboard, |
BoundingBox3f3f * | bbox = NULL , |
||
double * | rad = NULL |
||
) |
Compute the bounds of the billboard.
void SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::ComputeBounds | ( | MeshdataPtr | mesh, |
BoundingBox3f3f * | bbox = NULL , |
||
double * | rad = NULL |
||
) |
Compute the bounds of the mesh.
References Sirikata::Mesh::GeometryInstance::computeTransformedBounds(), and Sirikata::Mesh::Meshdata::GeometryInstanceIterator::next().
void SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::ComputeBounds | ( | BillboardPtr | billboard, |
const Matrix4x4f & | xform, | ||
BoundingBox3f3f * | bbox = NULL , |
||
double * | rad = NULL |
||
) |
Compute the bounds of the mesh when trasnformed by xform.
The bounding box is computed *after* transforming the mesh, so it is tighter than computing the bounding box of the transformed original bounding box.
void Sirikata::Mesh::computeCosts | ( | Mesh::MeshdataPtr | agg_mesh, |
uint32 | geomIdx, | ||
uint32 | sourcePositionIdx, | ||
uint32 | targetPositionIdx, | ||
std::tr1::unordered_map< int, int > & | vertexMapping, | ||
std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, Matrix4x4d > > & | submeshPositionQs, | ||
std::set< GeomPairContainer > & | vertexPairs, | ||
std::tr1::unordered_map< GeomPairContainer, float64, GeomPairContainer::Hasher > & | pairPriorities, | ||
std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, std::tr1::unordered_set< uint32 > > > & | submeshNeighborVertices, | ||
std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, std::vector< uint32 > > > & | vertexToFacesMap, | ||
std::tr1::unordered_map< GeomPairContainer, uint32, GeomPairContainer::Hasher > & | pairFrequency | ||
) |
void Sirikata::Mesh::computeCosts | ( | Mesh::MeshdataPtr | agg_mesh, |
std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, Matrix4x4d > > & | submeshPositionQs, | ||
std::set< GeomPairContainer > & | vertexPairs, | ||
std::tr1::unordered_map< GeomPairContainer, float64, GeomPairContainer::Hasher > & | pairPriorities, | ||
std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, std::tr1::unordered_set< uint32 > > > & | submeshNeighborVertices, | ||
std::tr1::unordered_map< uint32, std::tr1::unordered_map< uint32, std::vector< uint32 > > > & | vertexToFacesMap, | ||
std::tr1::unordered_map< GeomPairContainer, uint32, GeomPairContainer::Hasher > & | pairFrequency | ||
) |
References optimize(), position, and Sirikata::Mesh::SubMeshGeometry::positions.
Referenced by Sirikata::Mesh::MeshSimplifier::simplify().
bool Sirikata::Mesh::custom_isnan | ( | double | data | ) |
uint32 Sirikata::Mesh::findMappedVertex | ( | std::tr1::unordered_map< int, int > & | vertexMapping, |
uint32 | idx | ||
) | [inline] |
Referenced by computeCosts(), and Sirikata::Mesh::MeshSimplifier::simplify().
bool Sirikata::Mesh::optimize | ( | Matrix4x4d & | Q, |
const Vector3f & | v11, | ||
const Vector3f & | v21, | ||
Vector3f & | best | ||
) |
First compute cost of contracting to endpoint
Referenced by computeCosts().
bool SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::Raytrace | ( | VisualPtr | vis, |
const Matrix4x4f & | vis_xform, | ||
const Vector3f & | ray_start, | ||
const Vector3f & | ray_dir, | ||
float32 * | t_out, | ||
Vector3f * | hit_out | ||
) |
Traces a ray an returns information about the first point it hits on an the mesh.
Ray tracing is performed in mesh space, so if you want to perform the operation in world space, you need to transform the ray into object space, run the raytrace, and transform the results back.
vis | the mesh to test the ray against vis_xform transformation to apply to the mesh |
ray_start | the starting position of the ray to trace |
ray_dir | the direction of the ray to trace |
t_out | the parametric value for the collision, in terms of ray_start and ray_dir |
hit_out | the point of collision, if one was found |
References RaytraceType().
Referenced by Sirikata::JS::JSPositionListener::raytrace().
bool Sirikata::Mesh::RaytraceSphere | ( | const Vector3f & | center, |
float32 | radius, | ||
const Vector3f & | ray_start, | ||
const Vector3f & | ray_dir, | ||
bool | discard_inside, | ||
float32 * | t_out | ||
) |
Raytraces a sphere.
Assumes that t_out is initialized and will only update output values and return true if the hit is at t < t_orig.
center | The center position of the sphere |
radius | The radius of the sphere |
ray_start | the starting position of the ray to trace |
ray_dir | the direction of the ray to trace |
discard_inside | discard hits that start from inside the sphere |
t_out | the point of the collision, if one was found |
returns | true if the sphere was hit and it was before the existing hit |
Referenced by RaytraceSphere(), and RaytraceType().
bool Sirikata::Mesh::RaytraceSphere | ( | const Vector3f & | center, |
float32 | radius, | ||
const Vector3f & | ray_start, | ||
const Vector3f & | ray_dir, | ||
float32 * | t_out | ||
) |
Raytraces a sphere.
Assumes that t_out is initialized and will only update output values and return true if the hit is at t < t_orig.
center | The center position of the sphere |
radius | The radius of the sphere |
ray_start | the starting position of the ray to trace |
ray_dir | the direction of the ray to trace |
t_out | the point of the collision, if one was found |
returns | true if the sphere was hit and it was before the existing hit |
References RaytraceSphere().
bool Sirikata::Mesh::RaytraceTriangle | ( | const Vector3f & | v1, |
const Vector3f & | v2, | ||
const Vector3f & | v3, | ||
const Vector3f & | normal, | ||
const Vector3f & | ray_start, | ||
const Vector3f & | ray_dir, | ||
bool | positive_side, | ||
bool | negative_side, | ||
float32 * | t_out | ||
) |
Raytraces a single triangle.
Assumes that t_out is initialized and will only update output values and return true if the hit is at t < t_orig.
v1 | First vertex of triangle |
v2 | Second vertex of triangle |
v3 | Third vertex of triangle |
ray_start | the starting position of the ray to trace |
ray_dir | the direction of the ray to trace |
normal | the normal for this triangle |
positive_side | use collisions with the positive side of the triangle |
negative_side | use collisions with the positive side of the triangle |
t_out | the point of the collision, if one was found |
returns | true if the triangle was hit and it was before the existing hit |
Referenced by RaytraceTriangle(), and RaytraceType().
bool Sirikata::Mesh::RaytraceTriangle | ( | const Vector3f & | v1, |
const Vector3f & | v2, | ||
const Vector3f & | v3, | ||
const Vector3f & | ray_start, | ||
const Vector3f & | ray_dir, | ||
float32 * | t_out | ||
) |
Raytraces a single triangle.
Assumes that t_out is initialized and will only update output values and return true if the hit is at t < t_orig.
v1 | First vertex of triangle |
v2 | Second vertex of triangle |
v3 | Third vertex of triangle |
ray_start | the starting position of the ray to trace |
ray_dir | the direction of the ray to trace |
t_out | the point of the collision, if one was found |
returns | true if the triangle was hit and it was before the existing hit |
References RaytraceTriangle().
bool SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::RaytraceType | ( | BillboardPtr | vis, |
const Matrix4x4f & | vis_xform, | ||
const Vector3f & | ray_start, | ||
const Vector3f & | ray_dir, | ||
float32 * | t_out, | ||
Vector3f * | hit_out | ||
) |
bool SIRIKATA_MESH_FUNCTION_EXPORT Sirikata::Mesh::RaytraceType | ( | MeshdataPtr | vis, |
const Matrix4x4f & | vis_xform, | ||
const Vector3f & | ray_start, | ||
const Vector3f & | ray_dir, | ||
float32 * | t_out, | ||
Vector3f * | hit_out | ||
) |
References Sirikata::Mesh::GeometryInstance::geometryIndex, Sirikata::Mesh::SubMeshGeometry::Primitive::indices, Sirikata::Mesh::SubMeshGeometry::Primitive::LINES, Sirikata::Mesh::SubMeshGeometry::Primitive::LINESTRIPS, Sirikata::Mesh::Meshdata::GeometryInstanceIterator::next(), Sirikata::Mesh::SubMeshGeometry::Primitive::POINTS, Sirikata::Mesh::SubMeshGeometry::positions, Sirikata::Mesh::SubMeshGeometry::primitives, Sirikata::Mesh::SubMeshGeometry::Primitive::primitiveType, RaytraceTriangle(), Sirikata::Mesh::SubMeshGeometry::Primitive::TRIANGLES, Sirikata::Mesh::SubMeshGeometry::Primitive::TRIFANS, and Sirikata::Mesh::SubMeshGeometry::Primitive::TRISTRIPS.
Referenced by Raytrace().
SIRIKATA_MESH_EXPORT NodeIndex Sirikata::Mesh::NullNodeIndex = -1 |