|
| IE_CORE_DECLARERUNTIMETYPED (LinkedScene, SampledSceneInterface) |
|
| LinkedScene (const std::string &fileName, IndexedIO::OpenMode mode) |
|
| LinkedScene (ConstSceneInterfacePtr mainScene) |
|
void | writeLink (const SceneInterface *scene) |
|
std::string | fileName () const override |
| Returns the file that this scene is mapped to. Throws exception if there's no file.
|
|
Name | name () const override |
| Returns the name of the scene location which this instance is referring to. The root path returns "/".
|
|
void | path (Path &p) const override |
| Returns the path scene this instance is referring to.
|
|
size_t | numBoundSamples () const override |
| Returns the number of bounding box samples are available for reading.
|
|
double | boundSampleTime (size_t sampleIndex) const override |
| Returns the time associated with the specified bounding box sample.
|
|
double | boundSampleInterval (double time, size_t &floorIndex, size_t &ceilIndex) const override |
| Computes a sample interval suitable for use in producing interpolated bounding box values.
|
|
Imath::Box3d | readBoundAtSample (size_t sampleIndex) const override |
| Returns the local bounding box of this node stored for the specified sample.
|
|
Imath::Box3d | readBound (double time) const override |
|
void | writeBound (const Imath::Box3d &bound, double time) override |
|
size_t | numTransformSamples () const override |
| Returns the number of transform samples are available for reading.
|
|
double | transformSampleTime (size_t sampleIndex) const override |
| Returns the time associated with the specified transform sample.
|
|
double | transformSampleInterval (double time, size_t &floorIndex, size_t &ceilIndex) const override |
| Computes a sample interval suitable for use in producing interpolated transform values.
|
|
ConstDataPtr | readTransformAtSample (size_t sampleIndex) const override |
| Returns the transform applied to this path within the scene.
|
|
Imath::M44d | readTransformAsMatrixAtSample (size_t sampleIndex) const override |
| Returns the transform applied to this path within the scene as a matrix.
|
|
ConstDataPtr | readTransform (double time) const override |
|
Imath::M44d | readTransformAsMatrix (double time) const override |
|
void | writeTransform (const Data *transform, double time) override |
|
bool | hasAttribute (const Name &name) const override |
| Convenience method to determine if an attribute exists without reading it.
|
|
void | attributeNames (NameList &attrs) const override |
| Fills attrs with the names of all attributes available in the current directory.
|
|
size_t | numAttributeSamples (const Name &name) const override |
| Returns the number of attribute samples are available for reading.
|
|
double | attributeSampleTime (const Name &name, size_t sampleIndex) const override |
| Returns the time associated with the specified attribute sample.
|
|
double | attributeSampleInterval (const Name &name, double time, size_t &floorIndex, size_t &ceilIndex) const override |
| Computes a sample interval suitable for use in producing interpolated attribute values.
|
|
ConstObjectPtr | readAttributeAtSample (const Name &name, size_t sampleIndex) const override |
| Reads the named attribute applied to this path within the scene.
|
|
ConstObjectPtr | readAttribute (const Name &name, double time) const override |
| Returns the attribute value at the given time.
|
|
void | writeAttribute (const Name &name, const Object *attribute, double time) override |
|
bool | hasTag (const Name &name, int filter=SceneInterface::LocalTag) const override |
|
void | readTags (NameList &tags, int filter=SceneInterface::LocalTag) const override |
|
void | writeTags (const NameList &tags) override |
| Adds tags to the current scene location.
|
|
bool | hasObject () const override |
| Convenience method to determine if a piece of geometry exists without reading it.
|
|
size_t | numObjectSamples () const override |
| Returns the number of object samples are available for reading.
|
|
double | objectSampleTime (size_t sampleIndex) const override |
| Returns the time associated with the specified object sample.
|
|
double | objectSampleInterval (double time, size_t &floorIndex, size_t &ceilIndex) const override |
| Computes a sample interval suitable for use in producing interpolated objects.
|
|
ConstObjectPtr | readObjectAtSample (size_t sampleIndex) const override |
|
ConstObjectPtr | readObject (double time) const override |
| Reads the object stored at this path in the scene at the given time.
|
|
PrimitiveVariableMap | readObjectPrimitiveVariables (const std::vector< InternedString > &primVarNames, double time) const override |
|
void | writeObject (const Object *object, double time) override |
|
bool | hasChild (const Name &name) const override |
| Convenience method to determine if a child exists.
|
|
void | childNames (NameList &childNames) const override |
|
SceneInterfacePtr | child (const Name &name, SceneInterface::MissingBehaviour missingBehaviour=ThrowIfMissing) override |
|
ConstSceneInterfacePtr | child (const Name &name, SceneInterface::MissingBehaviour missingBehaviour=ThrowIfMissing) const override |
| Returns a read-only interface for a child location in the scene.
|
|
SceneInterfacePtr | createChild (const Name &name) override |
|
SceneInterfacePtr | scene (const Path &path, MissingBehaviour missingBehaviour=ThrowIfMissing) override |
| Returns a interface for querying the scene at the given path (full path).
|
|
ConstSceneInterfacePtr | scene (const Path &path, SceneInterface::MissingBehaviour missingBehaviour=ThrowIfMissing) const override |
| Returns a const interface for querying the scene at the given path (full path).
|
|
void | hash (HashType hashType, double time, MurmurHash &h) const override |
|
| IE_CORE_DECLARERUNTIMETYPED (SampledSceneInterface, SceneInterface) |
|
Imath::Box3d | readBound (double time) const override |
|
ConstDataPtr | readTransform (double time) const override |
|
Imath::M44d | readTransformAsMatrix (double time) const override |
|
ConstObjectPtr | readAttribute (const Name &name, double time) const override |
| Returns the attribute value at the given time.
|
|
ConstObjectPtr | readObject (double time) const override |
| Reads the object stored at this path in the scene at the given time.
|
|
| IE_CORE_DECLARERUNTIMETYPED (SceneInterface, RunTimeTyped) |
|
virtual bool | hasBound () const |
|
| IE_CORE_DECLAREMEMBERPTR (RunTimeTyped) |
|
virtual TypeId | typeId () const |
|
virtual const char * | typeName () const |
|
virtual bool | isInstanceOf (TypeId typeId) const |
|
virtual bool | isInstanceOf (const char *typeName) const |
|
| IE_CORE_DECLAREMEMBERPTR (RefCounted) |
|
void | addRef () const |
| Add a reference to the current object.
|
|
void | removeRef () const |
| Remove a reference from the current object.
|
|
RefCount | refCount () const |
| Returns the current reference count.
|
|
|
static IECore::CompoundDataPtr | linkAttributeData (const SceneInterface *scene) |
| Returns the data that should be stored in a link attribute if we want to map it to the given scene (no time remapping).
|
|
static IECore::CompoundDataPtr | linkAttributeData (const SceneInterface *scene, double time) |
|
static SceneInterfacePtr | create (const std::string &path, IndexedIO::OpenMode mode) |
|
static std::vector< std::string > | supportedExtensions (IndexedIO::OpenMode modes=IndexedIO::Read|IndexedIO::Write|IndexedIO::Append) |
|
static void | pathToString (const Path &p, std::string &path) |
| Converts a internal Path to a path-like string. The root path results in "/".
|
|
static void | stringToPath (const std::string &path, Path &p) |
|
static TypeId | staticTypeId () |
| Returns the TypeId for this class, without needing an instance.
|
|
static const char * | staticTypeName () |
| Returns the type name for this class, without needing an instance.
|
|
static TypeId | baseTypeId () |
|
static const char * | baseTypeName () |
|
static bool | inheritsFrom (TypeId typeId) |
| Returns true if this class inherits from the specified type.
|
|
static bool | inheritsFrom (const char *typeName) |
| Returns true if this class inherits from the specified type.
|
|
static bool | inheritsFrom (TypeId type, TypeId baseType) |
| Returns true if type inherits from baseType.
|
|
static bool | inheritsFrom (const char *typeName, const char *baseTypeName) |
| Returns true if typeName inherits from baseTypeName.
|
|
static TypeId | baseTypeId (TypeId typeId) |
| Returns the base type of the given type, or InvalidTypeId if no such base exists.
|
|
static const std::vector< TypeId > & | baseTypeIds (TypeId typeId) |
|
static const std::set< TypeId > & | derivedTypeIds (TypeId typeId) |
|
static TypeId | typeIdFromTypeName (const char *typeName) |
|
static const char * | typeNameFromTypeId (TypeId typeId) |
|
static void | registerType (TypeId derivedTypeId, const char *derivedTypeName, TypeId baseTypeId) |
| Allows external modules to register their own type ids.
|
|
|
enum | MissingBehaviour { ThrowIfMissing = IndexedIO::ThrowIfMissing,
NullIfMissing = IndexedIO::NullIfMissing,
CreateIfMissing = IndexedIO::CreateIfMissing
} |
|
enum | TagFilter { DescendantTag = 1,
LocalTag = 2,
AncestorTag = 4,
EveryTag = DescendantTag | LocalTag | AncestorTag
} |
|
enum | HashType {
TransformHash,
AttributesHash,
BoundHash,
ObjectHash,
ChildNamesHash,
HierarchyHash
} |
|
typedef IndexedIO::EntryID | Name |
|
typedef IndexedIO::EntryIDList | NameList |
|
typedef IndexedIO::EntryIDList | Path |
|
typedef RefCounted | BaseClass |
| A typedef for the class this class derives from. All RunTimeTyped classes define this typedef.
|
|
typedef size_t | RefCount |
|
typedef SceneInterfacePtr(* | CreatorFn) (const std::string &, IndexedIO::OpenMode) |
|
typedef std::map< TypeId, TypeId > | BaseTypeRegistryMap |
|
typedef std::map< TypeId, std::vector< TypeId > > | BaseTypesRegistryMap |
|
typedef std::map< TypeId, std::set< TypeId > > | DerivedTypesRegistryMap |
|
typedef tbb::spin_rw_mutex | Mutex |
|
typedef std::map< TypeId, std::string > | TypeIdsToTypeNamesMap |
|
typedef std::map< std::string, TypeId > | TypeNamesToTypeIdsMap |
|
static CreatorMap & | fileCreators () |
|
static void | registerCreator (const std::string &extension, IndexedIO::OpenMode modes, CreatorFn f) |
|
static BaseTypeRegistryMap & | baseTypeRegistry () |
|
static DerivedTypesRegistryMap & | derivedTypesRegistry () |
|
static BaseTypesRegistryMap & | completeBaseTypesRegistry () |
|
static DerivedTypesRegistryMap & | completeDerivedTypesRegistry () |
|
static void | derivedTypeIdsWalk (TypeId typeId, std::set< TypeId > &) |
|
static TypeIdsToTypeNamesMap & | typeIdsToTypeNames () |
|
static TypeNamesToTypeIdsMap & | typeNamesToTypeIds () |
|
static Mutex | g_baseTypeIdsMutex |
|
static Mutex | g_derivedTypeIdsMutex |
|
Implements a scene that have references (links) to external scenes. Links can be created at any location in a scene. When a link is created in a given location, the object, bounds and children will be loaded from the linked scene (with time remapping). The transform, attributes are still loaded from the main scene. Tags defined in the link location will be applied (when read) to all the child transforms from the linked scene. This class wraps another SceneInterface object that is responsible for actually storing the data (we call it the "main scene"). Links are represented as an attribute in the main scene called "SceneInterface:link". When created for reading, this class provides seamless access to the hierarchy inside the linked scenes, concatenating the two hierarchies in a single path that uniquely identify that location. The time is also transparently translated. Tags that were saved in the linked scene are propagated to the main scene, to keep consistent behavior. When writing, there's no access to the contents of the indexed scene. Instead, it creates the links by either (1) calls to the function writeLink() or (2) calls to the function writeAttribute( LinkedScene::linkSceneAttribute, LinkedScene::linkAttributeData(), ... ). Note that the link can be animated, allowing for time remapped animations.