Public Member Functions | |
| GeometryList () | |
| unsigned | objects () const |
| unsigned | offset () const |
| GeoOp * | geo () const |
| unsigned | size () const |
| void | add_object (int obj) |
| void | delete_objects () |
| void | synchronize_objects () |
| int | add_primitive (int obj, Primitive *p=nullptr) |
| Primitive * | writable_primitive (int obj, int prim) |
| PointList * | writable_points (int obj) |
| Attribute * | writable_attribute (int obj, GroupType group, const char *name, AttribType type) |
| Attribute * | writable_attribute (int obj, const AttribContext *attrib) |
| AttribContext * | writable_attribcontext (int obj, GroupType group, const char *name, AttribType type) |
| AttribContext * | writable_attribcontext (int obj, const AttribContext *attrib) |
| void | delete_attribcontext (int obj, GroupType group, const char *name, AttribType type) |
| void | set_recursion_mask (int obj, unsigned mask) |
| void | clear_recursion_mask (int obj, unsigned mask) |
| const GeoInfo & | operator[] (const size_t i) const |
| GeoInfo & | operator[] (const size_t i) |
| GeoInfo & | object (unsigned i) |
| GeoInfo & | object0 () |
| const GeometryMask & | rebuild_mask () const |
| bool | rebuild (const GeometryMask &m=GeometryMask(Mask_All_Geometry)) const |
| void | set_rebuild (const GeometryMask &m) |
| const Hash & | hash (int i) const |
| void | compact (int obj) |
| void | push_range () |
| void | set_range (unsigned offset, unsigned objects) |
| bool | pop_range () |
Friends | |
| class | Scene |
| class | GeoOp |
A list of GeoInfos with state flags and out-of-dateness hashes.
| GeometryList::GeometryList | ( | ) |
Constructor. Initializes the geometry hashes.
|
inline |
Current object count.
|
inline |
Absolute starting index in output list.
|
inline |
The GeoOp that is currently manipulating this cache.
Referenced by DD::Image::GeoOp::get_geometry().
|
inline |
Object count. Duplicate call to object() for convenience.
Referenced by DD::Image::Render::_request(), DD::Image::Scene::generate_render_primitives(), DD::Image::ModifyGeo::geometry_engine(), DD::Image::TransformGeo::geometry_engine(), DD::Image::ReadGeo::geometry_engine(), DD::Image::GeoOp::get_geometry(), DD::Image::SourceGeo::init_geoinfo_parms(), DD::Image::GeoOp::print_info(), DD::Image::GeoOp::setupScene(), and DD::Image::Scene::validate().
| void GeometryList::add_object | ( | int | obj | ) |
Add a GeoInfo to the cache.
References DD::Image::GeoInfo::Cache::bbox, DD::Image::GeoOp::cache_list, DD::Image::Op::node(), object(), DD::Image::GeoInfo::Cache::out_id, DD::Image::GeoInfo::Cache::recursion_mask, DD::Image::Hash::reset(), DD::Image::GeoInfo::Cache::src_id, synchronize_objects(), DD::Image::GeoInfo::Cache::type, and DD::Image::GeoInfo::Cache::version.
| void GeometryList::delete_objects | ( | ) |
Delete all allocated geometry and clear the cache and output list of objects.
References DD::Image::GeoOp::delete_cache(), and DD::Image::end().
Referenced by DD::Image::ReadGeo::create_geometry().
| void GeometryList::synchronize_objects | ( | ) |
Synchronize the local cache object list with the current object list. Calling this repeatedly is cheap as it returns quickly if the cache's build_hash already matches the geo's build hash.
References DD::Image::GeoInfo::Cache::attributes, DD::Image::GeoInfo::Cache::bbox, DD::Image::GeoOp::cache_list, DD::Image::Op::Class(), object(), DD::Image::GeoInfo::Cache::out_id, DD::Image::GeoInfo::Cache::recursion_mask, DD::Image::GeoInfo::Cache::src_id, DD::Image::GeoOp::synchronize_cache(), DD::Image::GeoInfo::Cache::type, and DD::Image::GeoInfo::Cache::version.
Referenced by add_object(), add_primitive(), DD::Image::GeoOp::build_scene(), DD::Image::SourceGeo::geometry_engine(), and DD::Image::GeoOp::get_geometry().
| int GeometryList::add_primitive | ( | int | obj, |
| Primitive * | p = nullptr |
||
| ) |
Create a local primitive allocation and append a primitive to it if p is non-NULL. Returns the current size of the list.
References DD::Image::Attribute::add(), DD::Image::RefCountedPtr< T >::allocate(), DD::Image::AttribContext::attribute, DD::Image::GeoInfo::Cache::attributes, DD::Image::GeoOp::cache_list, DD::Image::PrimitiveList::capacity(), DD::Image::Primitive::face_vertices(), DD::Image::Primitive::faces(), DD::Image::AttribContext::group, DD::Image::Primitive::material_, object(), DD::Image::GeoInfo::Cache::primitives, DD::Image::PrimitiveList::push_back(), DD::Image::PrimitiveList::reserve(), DD::Image::PrimitiveList::size(), DD::Image::Attribute::size(), synchronize_objects(), DD::Image::Primitive::vertex_offset_, and DD::Image::GeoInfo::Cache::vertices.
| Primitive * GeometryList::writable_primitive | ( | int | obj, |
| int | prim | ||
| ) |
Return a local writable primitive by index.
References DD::Image::GeoOp::cache_list.
Referenced by compact().
|
inline |
Returns GeoInfo n offset into the current stream.
|
inline |
Returns GeoInfo n offset into the current stream.
|
inline |
Returns GeoInfo n offset into the current stream.
Referenced by add_object(), add_primitive(), compact(), DD::Image::GeoOp::print_info(), and synchronize_objects().
|
inline |
Returns the first GeoInfo in the current stream.
|
inline |
What groups need updating.
|
inline |
Geometry group out-of-dateness hashes.
Referenced by DD::Image::GeoOp::print_info().
| void GeometryList::compact | ( | int | obj | ) |
Compact the geometry data removing unused vertices and remapping all face indices
References DD::Image::AttribContext::group, DD::Image::AttribContext::name, object(), DD::Image::AttribContext::type, and writable_primitive().
| ©2024 The Foundry Visionmongers, Ltd. All Rights Reserved. |