HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OSchema.h File Reference
+ Include dependency graph for OSchema.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Alembic::Abc::ALEMBIC_VERSION_NS::OSchema< INFO >
 

Namespaces

 Alembic
 Alembic namespace ...
 
 Alembic::Abc
 
 Alembic::Abc::ALEMBIC_VERSION_NS
 

Macros

#define ALEMBIC_ABC_DECLARE_SCHEMA_INFO(STITLE, SBTYP, SDFLT, SPREP, STDEF)
 

Macro Definition Documentation

#define ALEMBIC_ABC_DECLARE_SCHEMA_INFO (   STITLE,
  SBTYP,
  SDFLT,
  SPREP,
  STDEF 
)
Value:
struct STDEF \
{ \
static const char * title() { return ( STITLE ) ; } \
static const char * defaultName() { return ( SDFLT ); } \
static const char * schemaBaseType() { return ( SBTYP ); } \
static bool replaceOnSparse() { return SPREP; } \
}

With properties, specific flavors of properties are expressed via the TypedScalarProperty and the TypedArrayProperty. Compound Properties are more complex, and the specific flavors require a more complex treatment - That's what Schemas are. The CompoundProperty equivalent of a TypedArrayProperty or a TypedScalarProperty.

A Schema is a collection of grouped properties which implement some complex object, such as a poly mesh. In the simpelest, standard case, there will be a compound property at the top with a certain name, and inside the compound property will be some number of additional properties that implement the object. In the case of a poly mesh, these properties would include a list of vertices (a V3fArray), a list of indices (an Int32Array), and a list of "per-face counts" (also an Int32Array).

In somewhat more complex cases, such as a TransformStack, the set of properties that are added may vary based on configuration information provided by the user.

Because a Schema is to a CompoundProperty what a TypedArrayProperty or TypedScalarProperty is to a regular property, it is directly derived from CompoundProperty. However... Whereas TypedProperties can be instanced as typedefs, Schemas will invariably require additional functionality, and thus the StdCompoundSchema is intended for use as a base class.With properties, specific flavors of properties are expressed via the TypedScalarProperty and the TypedArrayProperty. Compound Properties are more complex, and the specific flavors require a more complex treatment - That's what Schemas are. The CompoundProperty equivalent of a TypedArrayProperty or a TypedScalarProperty.

A Schema is a collection of grouped properties which implement some complex object, such as a poly mesh. In the simpelest, standard case, there will be a compound property at the top with a certain name, and inside the compound property will be some number of additional properties that implement the object. In the case of a poly mesh, these properties would include a list of vertices (a V3fArray), a list of indices (an Int32Array), and a list of "per-face counts" (also an Int32Array). Here is a macro for declaring SCHEMA_INFO It takes these arguments

  • the SchemaTitle( a string ),
  • the SchemaBaseType( a string ),
  • the DefaultSchemaName( a string ),
  • whether to set replace when the sparse argument is provided( bool ),
  • the name of the SchemaInfo Type to be declared.
  • for example: ALEMBIC_ABC_DECLARE_SCHEMA_INFO( "AbcGeom_PolyMesh_v1", "AbcGeom_GeomBase_v1", ".geom", false, PolyMeshSchemaInfo );

Definition at line 105 of file OSchema.h.