HDK
|
Container class for all geometry. More...
#include <GA_Detail.h>
Classes | |
class | IOStatus |
class | OffsetMarker |
Public Types | |
enum | GA_DestroyPointMode { GA_LEAVE_PRIMITIVES, GA_DESTROY_DEGENERATE, GA_DESTROY_DEGENERATE_INCOMPATIBLE } |
typedef GA_Primitive | GB_MACRO_PRIM_TYPE |
Static Public Member Functions | |
static GA_IntrinsicManager::Registrar | registerIntrinsics (GA_PrimitiveFactory &factory) |
template<typename FUNCTOR > | |
static void | forEachOffset (FUNCTOR &&functor, const GA_IndexMap &index_map, const GA_ElementGroup *group=nullptr, bool complement=false) |
template<typename FUNCTOR > | |
static void | forEachOffsetBreak (FUNCTOR &&functor, const GA_IndexMap &index_map, const GA_ElementGroup *group=nullptr, bool complement=false) |
static int64 | printMemory (UT_WorkBuffer &buffer, bool include_total=true, int indent=3, const char *title="Geometry Memory Tracking") |
Debugging output of detail. More... | |
template<typename T > | |
static const T::GB_MACRO_PRIM_TYPE * | GB_MACRO_CAST (const T *, const GA_Primitive *prim) |
template<typename T > | |
static T::GB_MACRO_PRIM_TYPE * | GB_MACRO_CAST (const T *, GA_Primitive *prim) |
Static Public Attributes | |
static const int64 | INVALID_CACHE_COUNT = -1 |
Static Protected Member Functions | |
static void | finishLoadH9 (const UT_Array< GA_AttribLoadDataH9 > &attribs) |
Friends | |
class | GA_AttributeSet |
class | GA_IO |
class | GA_PrimitiveList |
bool | saveVertexPointReferenceH9 (std::ostream &os, int binary, GA_Offset vertex_offset) const |
bool | loadVertexH9 (UT_IStream &is, GA_Offset vertex_offset, const UT_Array< GA_AttribLoadDataH9 > &vtx_l) |
bool | saveVertexH9 (std::ostream &os, int binary, GA_Offset vertex_offset, const UT_Array< GA_AttribSaveDataH9 > &vtx_l) const |
static bool | loadAttribDataH9 (UT_IStream &is, GA_Offset offset, const UT_Array< GA_AttribLoadDataH9 > &l) |
static bool | saveAttribDataH9 (std::ostream &os, int binary, GA_Offset offset, const UT_Array< GA_AttribSaveDataH9 > &l, char delim_ch= '(') |
Container class for all geometry.
All Houdini geometry is stored in a GA_Detail class. The detail stores lists of attributes (GA_Attribute) which are maintained in GA_AttributeSet collections. The attribute set contains 4 separate classes of attribute based on the GA_AttributeOwner enum.
Definition at line 96 of file GA_Detail.h.
Definition at line 2226 of file GA_Detail.h.
When destroying points, there are three different modes when dealing with primitives that reference the points. These modes cause different behaviours when notifying primitives about point deletion. The behaviour is determined by the result of primitive->dereferencePoint()
or primitive->dereferencePoints()
.
Enumerator | |
---|---|
GA_LEAVE_PRIMITIVES | |
GA_DESTROY_DEGENERATE | |
GA_DESTROY_DEGENERATE_INCOMPATIBLE |
Definition at line 642 of file GA_Detail.h.
GA_Detail::GA_Detail | ( | GA_PrimitiveFactory & | factory, |
GA_Storage | Pstorage = GA_STORE_REAL32 , |
||
bool | isprimary = true , |
||
bool | full_topology = true |
||
) |
Pstorage | determines the precision of the P attribute. |
isprimary | determines the default value of the P attribute. true yields (0,0,0) as the default, and false yields (0,0,1), for use by GD_Detail, where the z component is actually the point weight for NURBS/Bezier trim/profile curves. P will have typeinfo "hpoint" if secondary, and "point" if primary. |
full_topology | indicates whether the detail should maintain additional attributes which make it easy to lookup
|
|
virtual |
Destructor.
void GA_Detail::addTailInitializer | ( | GA_Attribute * | attrib | ) |
Add/Remove an attribute to the tail-initialization list.
When attributes grow in size, they usually initialize their values to the default value. However, some attributes may not adhere to this rule, or due to space optimizations, may have the values set to non-default values. In this case, they should be added to the tail-initialization list. When new elements are appended to the detail, they will be told to re-initialize the new element. Otherwise, the detail will assume that the element values are at their default value.
When removing, the method will return true
if the attribute was a tail initializer.
|
inline |
Append a new point, returning its new data offset.
Definition at line 326 of file GA_Detail.h.
|
inline |
Append new points, returning the first offset of the contiguous block.
Definition at line 330 of file GA_Detail.h.
GA_Primitive* GA_Detail::appendPrimitive | ( | const GA_PrimitiveTypeId & | type | ) |
Append a primitive by GA_PrimitiveTypeId.
GA_Primitive* GA_Detail::appendPrimitive | ( | const UT_StringRef & | type | ) |
Append a primitive by type name string.
GA_Offset GA_Detail::appendPrimitiveBlock | ( | const GA_PrimitiveTypeId & | type, |
GA_Size | nprimitives | ||
) |
Append a contiguous block of primitives by GA_PrimitiveTypeId.
GA_Offset GA_Detail::appendPrimitivesAndVertices | ( | const GA_PrimitiveTypeId & | type, |
GA_Size | nprimitives, | ||
GA_Size | nvertices_each, | ||
GA_Offset & | vertex_block_start, | ||
bool | closed_flag = false |
||
) |
Append a contiguous block of primitives and a contiguous block of vertices, with each primitive having nvertices_each vertices, though the vertices will be unwired, so the caller is responsible for wiring the vertices to points. Make absolutely sure you know what you're doing if you call this! It's used by GEO_PrimPoly::buildBlock() and GEO_PrimTetrahedron:: buildBlock(). The return value is the start offset of the primitive block, and vertex_block_start is filled with the start offset of the vertex block.
GA_Offset GA_Detail::appendPrimitivesAndVertices | ( | const GA_PrimitiveTypeId & | type, |
const GA_PolyCounts & | vertex_counts, | ||
GA_Offset & | vertex_block_start, | ||
bool | closed_flag = false |
||
) |
Append a contiguous block of primitives and a contiguous block of vertices, with vertex_counts being a run-length encoded array indicating the number of vertices in each primitive, though the vertices will be unwired, so the caller is responsible for wiring the vertices to points. Make absolutely sure you know what you're doing if you call this! It's used by GEO_PrimPoly::buildBlock() and GEO_PrimTetrahedron:: buildBlock(). The return value is the start offset of the primitive block, and vertex_block_start is filled with the start offset of the vertex block.
GA_Offset GA_Detail::appendPrimitivesAndVertices | ( | const std::pair< int, exint > * | primtype_count_pairs, |
const GA_PolyCounts & | vertex_counts, | ||
GA_Offset & | vertex_block_start, | ||
const exint * | closed_span_length = nullptr , |
||
exint | ncopies = 1 |
||
) |
|
inline |
Append a vertex (for the entire detail)
Definition at line 497 of file GA_Detail.h.
|
inline |
Append new vertices, returning the first offset of the contiguous block.
Definition at line 500 of file GA_Detail.h.
Merge the source detail into this detail (using default options)
void GA_Detail::baseMerge | ( | const GA_Detail & | src, |
GA_MergeOptions & | options | ||
) |
Merge the source detail into this detail with options.
|
virtual |
Builds a new CEAttribute for the given topology. This is not cached internally anywhere, nor does it use any existing cache.
Reimplemented in GU_Detail.
void GA_Detail::bumpAllDataIds | ( | ) |
This bumps all data IDs in this detail, including point, vertex, primitive, and detail attribute data IDs, the primitive list data ID, and edge group data IDs.
void GA_Detail::bumpDataIdsForAddOrRemove | ( | bool | added_or_removed_points, |
bool | added_or_removed_vertices, | ||
bool | added_or_removed_primitives | ||
) |
Call this to bump the appropriate data IDs when points, vertices, or primitives have been added or removed. If you're not 100% sure whether an element type has been added or removed, it's better to err on the side of safety and pass true for it.
void GA_Detail::bumpDataIdsForRewire | ( | ) |
Call this to bump the appropriate topology data IDs when vertices have been rewired to different points.
If vertices have been added or removed, or if they've been "stolen" by a different primitive, just call bumpDataIdsForAddOrRemove(____,true,____) instead. If points have been added or removed, but vertices have only been rewired, call bumpDataIdsForAddOrRemove(true,false,false) in addition to this.
bool GA_Detail::checkValidTopology | ( | ) | const |
|
inline |
Re-initialize:
Definition at line 127 of file GA_Detail.h.
|
inlinevirtual |
This clears any caches that subclasses of GA_Detail may have, so that replacing the content of the detail doesn't cause crashes. NOTE: You may or may not also have to call refreshCachedHandles later if P or Pw might be replaced or change storage.
Reimplemented in GU_Detail.
Definition at line 1931 of file GA_Detail.h.
void GA_Detail::clearInstanceMatrix | ( | ) |
Clear the attribute instance matrix pointer. This is called automatically when point attributes are added or deleted.
void GA_Detail::clearTopologyAttributes | ( | ) |
void GA_Detail::cloneCopyGroupsAndAttributes | ( | const GA_Detail & | src, |
bool | copydetailattribs = false |
||
) |
Copy groups and attribute definitions from the source detail.
The caller should ensure that all attributes are cleared before calling this method (i.e. call clear())
|
pure virtual |
Create a new detail that has all the same attributes, groups, etc. but has no elements. Subclasses should look at: cloneCopyGroupsAndAttributes()
Implemented in GU_Detail, and GEO_Profiles.
void GA_Detail::cloneMissingAttributes | ( | const GA_Detail & | src, |
GA_AttributeOwner | owner, | ||
const GA_AttributeFilter & | filter | ||
) |
Clone any missing attributes from the source detail, skipping P, any topology, and any group attributes.
void GA_Detail::cloneMissingGroups | ( | const GA_Detail & | src, |
GA_AttributeOwner | owner, | ||
const GA_AttributeFilter & | filter | ||
) |
Clone any missing groups from the source detail.
void GA_Detail::computeQuickBounds | ( | UT_BoundingBox & | box | ) | const |
Compute the bounding box quickly by:
void GA_Detail::computeQuickBounds | ( | UT_BoundingBox & | box, |
GA_Size | counts[], | ||
GA_Size | count_buf_size | ||
) | const |
Compute the bounding box quickly by:
counts
buffer will be filled with the count of each primitive type in the detail. The count_buf_size should be set to getPrimitiveFactory()
.getPrimTypeCount();
|
inline |
Tell all tail initialization attributes to initialize the given offset
Definition at line 2288 of file GA_Detail.h.
|
inline |
Definition at line 2303 of file GA_Detail.h.
|
inline |
Definition at line 2297 of file GA_Detail.h.
|
inline |
Definition at line 2295 of file GA_Detail.h.
void GA_Detail::copyAttributes | ( | GA_AttributeOwner | owner, |
GA_Offset | destoff, | ||
GA_Offset | srcoff, | ||
const GA_AttributeFilter * | filter = nullptr |
||
) |
Copy all attribute values from srcoff to destoff for attributes accepted by filter. If no filter is specified, all public attributes and non-internal groups are copied.
NOTE: If you're copying multiple offsets, it's much faster to do: For each attribute, copy data for all offsets; rather than: For each offset, copy data in all attributes. These functions are only for if the former is too awkward to do in some case.
void GA_Detail::copyAttributes | ( | GA_AttributeOwner | owner, |
GA_Offset | destoff, | ||
const GA_Detail & | srcdetail, | ||
GA_Offset | srcoff, | ||
const GA_AttributeFilter * | filter = nullptr |
||
) |
Copy all attribute values from srcoff to destoff for attributes accepted by filter. If no filter is specified, all public attributes and non-internal groups are copied.
NOTE: If you're copying multiple offsets, it's much faster to do: For each attribute, copy data for all offsets; rather than: For each offset, copy data in all attributes. These functions are only for if the former is too awkward to do in some case.
void GA_Detail::copyChangedNonTransforming | ( | const GA_Detail * | inputgeo, |
GA_AttributeOwner | owner | ||
) |
Copy changed/non transforming attribute values from inputgeo owner specifies the attribute class to act upon This is used by SOP_Deform/SOP_AttribVop to speed up the duplication of input gdp.
|
inline |
Copy all attribute values from srcptoff to destptoff for point attributes accepted by filter. If no filter is specified, all public attributes and non-internal groups are copied.
Definition at line 1861 of file GA_Detail.h.
|
inline |
Copy all attribute values from srcvtxoff to destvtxoff for vertex attributes accepted by filter. If no filter is specified, all public attributes and non-internal groups are copied. If ref_point_dont_copy is true, the point of srcvtxoff is referenced by destvtxoff, otherwise point attributes are also copied. NOTE: If you only want to copy vertex attributes, and not the point, call copyAttributes(GA_ATTRIB_VERTEX, ...)
Definition at line 1877 of file GA_Detail.h.
|
virtual |
Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. If inclusive is true, the size of this object is counted, else only memory owned by this object is counted. If this is pointed to by the calling object, inclusive should be true. If this is contained in the calling object, inclusive should be false. (Its memory was already counted in the size of the calling object.)
Reimplemented in GEO_Detail, GD_Detail, GU_Detail, and GEO_Profiles.
|
inline |
Definition at line 2299 of file GA_Detail.h.
|
inline |
Definition at line 2301 of file GA_Detail.h.
GA_Size GA_Detail::countUnusedPoints | ( | ) | const |
Returns the number of unused points, requiring a pass through the geometry
|
inline |
createAttribute is very general purpose method, requiring some knowledge about ATIs, etc. Unless you are creating your own user-defined attributes, it would likely be better to use something at the GEO_Detail level, like addFloatTuple.
Definition at line 867 of file GA_Detail.h.
|
inline |
createAttribute is very general purpose method, requiring some knowledge about ATIs, etc. Unless you are creating your own user-defined attributes, it would likely be better to use something at the GEO_Detail level, like addFloatTuple.
Definition at line 878 of file GA_Detail.h.
|
inline |
This will create detached attributes. They will have the right number of elements at the moment of creation, but will not update with changes to the detail. These attributes will have no name.
Definition at line 908 of file GA_Detail.h.
|
inline |
This will create detached attributes. They will have the right number of elements at the moment of creation, but will not update with changes to the detail. These attributes will have no name.
Definition at line 920 of file GA_Detail.h.
|
inline |
Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.
Be sure to do "delete group;" to clean it up.
Definition at line 1373 of file GA_Detail.h.
|
inline |
Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.
Be sure to do "delete group;" to clean it up.
Definition at line 1361 of file GA_Detail.h.
|
inline |
Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.
Be sure to do "delete group;" to clean it up.
Definition at line 1365 of file GA_Detail.h.
|
inline |
This will create detached attributes. They will have the right number of elements at the moment of creation, but will not update with changes to the detail. These attributes will have no name.
Definition at line 895 of file GA_Detail.h.
|
inline |
Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.
Be sure to do "delete group;" to clean it up.
Definition at line 1369 of file GA_Detail.h.
GA_EdgeGroup* GA_Detail::createEdgeGroup | ( | const UT_StringHolder & | name | ) |
GA_ElementGroup* GA_Detail::createElementGroup | ( | GA_AttributeOwner | owner, |
const UT_StringHolder & | name, | ||
bool | ordered = false |
||
) |
|
inline |
Definition at line 1200 of file GA_Detail.h.
GA_EdgeGroup* GA_Detail::createInternalEdgeGroup | ( | ) |
GA_ElementGroup* GA_Detail::createInternalElementGroup | ( | GA_AttributeOwner | owner, |
bool | ordered = false |
||
) |
|
inline |
Definition at line 1210 of file GA_Detail.h.
|
inline |
Definition at line 986 of file GA_Detail.h.
|
inline |
Definition at line 997 of file GA_Detail.h.
void GA_Detail::createTopologyAttributes | ( | ) |
|
inline |
Definition at line 957 of file GA_Detail.h.
|
inline |
Definition at line 972 of file GA_Detail.h.
bool GA_Detail::defragment | ( | GA_AttributeOwner | owner, |
const UT_Options * | options = nullptr |
||
) |
Defragment index maps NOTE: To make sure that it actually defragments when there is even just one hole, you must pass a UT_Options with a "removeholes" bool option set to true. NOTE: If any defragmenting occurs, this bumps data IDs for everything that is modified.
bool GA_Detail::defragment | ( | const UT_Options * | options = nullptr | ) |
Defragment everything. NOTE: To make sure that it actually defragments when there is even just one hole, you must pass a UT_Options with a "removeholes" bool option set to true. NOTE: If any defragmenting occurs, this bumps data IDs for everything that is modified.
GA_Size GA_Detail::destroyAllEmptyGroups | ( | ) |
|
inline |
Definition at line 933 of file GA_Detail.h.
|
inline |
Definition at line 941 of file GA_Detail.h.
GA_Size GA_Detail::destroyDegeneratePrimitives | ( | const GA_PrimitiveGroup * | prims = 0 , |
bool | and_points = false |
||
) |
|
inline |
Definition at line 1278 of file GA_Detail.h.
|
inline |
Definition at line 1281 of file GA_Detail.h.
|
inline |
Definition at line 1238 of file GA_Detail.h.
|
inline |
Definition at line 1242 of file GA_Detail.h.
bool GA_Detail::destroyElementGroup | ( | GA_ElementGroup * | group | ) |
GA_Size GA_Detail::destroyEmptyGroups | ( | GA_AttributeOwner | owner | ) |
bool GA_Detail::destroyGroup | ( | GA_Group * | group | ) |
bool GA_Detail::destroyPointIndex | ( | GA_Index | index, |
GA_DestroyPointMode | mode = GA_LEAVE_PRIMITIVES , |
||
bool | guarantee_no_vertex_references = false |
||
) |
Destroy the given point. This may leave dangling vertex references if there is no full topology.
If the guarantee_no_vertex_references
flag is true, the operation will be more efficient, but you must truly guarantee that there are no vertices referring to the point.
bool GA_Detail::destroyPointOffset | ( | GA_Offset | ptoff, |
GA_DestroyPointMode | mode = GA_LEAVE_PRIMITIVES , |
||
bool | guarantee_no_vertex_references = false |
||
) |
Destroy the given point. This may leave dangling vertex references if there is no full topology.
If the guarantee_no_vertex_references
flag is true, the operation will be more efficient, but you must truly guarantee that there are no vertices referring to the point.
|
inline |
Destroy unused points in given point range
Definition at line 696 of file GA_Detail.h.
|
inline |
Destroy unused points in given point range
Definition at line 703 of file GA_Detail.h.
bool GA_Detail::destroyPrimitive | ( | GA_Primitive & | prim, |
bool | and_points = false |
||
) |
bool GA_Detail::destroyPrimitiveIndex | ( | GA_Index | index, |
bool | and_points = false |
||
) |
|
virtual |
Destroy the given primitive. Optionally destroy any referenced points that will no longer be in use after this operation. Note that this option requires full topology.
Reimplemented in GD_Detail.
|
virtual |
Destroy the given primitives. Optionally destroy any referenced points that will no longer be in use after this operation. Note that this option requires full topology.
Reimplemented in GD_Detail.
Definition at line 680 of file GA_Detail.h.
|
inline |
These two functions should be used instead of the more destructive clearAndDestroy() when it it likely the geometry it relatively stable between operations
Definition at line 156 of file GA_Detail.h.
|
inline |
Destroy unused points. If ptgrp is given, then only within the group.
Definition at line 689 of file GA_Detail.h.
Destroy unused points in given point range
bool GA_Detail::destroyVertexOffset | ( | GA_Offset | offset | ) |
Destroy the given vertex
Definition at line 713 of file GA_Detail.h.
Definition at line 715 of file GA_Detail.h.
|
protected |
|
inline |
Access point, primitive, vertex, or edge group tables
Definition at line 1191 of file GA_Detail.h.
|
inline |
Access point, primitive, vertex, or edge group tables
Definition at line 1193 of file GA_Detail.h.
bool GA_Detail::enlargeBoundingBox | ( | UT_BoundingRect & | box, |
const GA_Range & | range | ||
) | const |
bool GA_Detail::enlargeBoundingBox | ( | UT_BoundingRect & | box, |
const GA_Range & | range, | ||
const GA_Attribute * | P | ||
) | const |
bool GA_Detail::enlargeBoundingBox | ( | UT_BoundingBox & | box, |
const GA_Range & | range | ||
) | const |
bool GA_Detail::enlargeBoundingBox | ( | UT_BoundingBox & | box, |
const GA_Range & | range, | ||
const GA_Attribute * | P | ||
) | const |
|
inline |
Find an existing attribute, returning a read-only reference.
Definition at line 1010 of file GA_Detail.h.
|
inline |
Definition at line 1020 of file GA_Detail.h.
|
inline |
Definition at line 1028 of file GA_Detail.h.
|
inline |
Definition at line 1033 of file GA_Detail.h.
|
inline |
Find an existing attribute, returning a read-write reference.
Definition at line 1068 of file GA_Detail.h.
|
inline |
Definition at line 1078 of file GA_Detail.h.
|
inline |
Definition at line 1086 of file GA_Detail.h.
|
inline |
Definition at line 1091 of file GA_Detail.h.
const GA_EdgeGroup* GA_Detail::findEdgeGroup | ( | const UT_StringRef & | name | ) | const |
GA_EdgeGroup* GA_Detail::findEdgeGroup | ( | const UT_StringRef & | name | ) |
GA_ElementGroup* GA_Detail::findElementGroup | ( | GA_AttributeOwner | owner, |
const UT_StringRef & | name | ||
) |
const GA_ElementGroup* GA_Detail::findElementGroup | ( | GA_AttributeOwner | owner, |
const UT_StringRef & | name | ||
) | const |
|
inline |
Definition at line 1219 of file GA_Detail.h.
|
inline |
Definition at line 1227 of file GA_Detail.h.
|
inline |
Definition at line 1058 of file GA_Detail.h.
|
inline |
Definition at line 1062 of file GA_Detail.h.
|
inline |
Definition at line 1116 of file GA_Detail.h.
|
inline |
Definition at line 1120 of file GA_Detail.h.
|
inline |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
Definition at line 1434 of file GA_Detail.h.
|
inline |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
Definition at line 1430 of file GA_Detail.h.
|
inline |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
Definition at line 1432 of file GA_Detail.h.
|
inline |
Find an IO class. If no name is specified, the "default" IO class will be returned (the one specified by HOUDINI_GEOMETRY_FORMAT).
Definition at line 1960 of file GA_Detail.h.
|
inline |
Definition at line 1037 of file GA_Detail.h.
|
inline |
Definition at line 1041 of file GA_Detail.h.
|
inline |
Definition at line 1095 of file GA_Detail.h.
|
inline |
Definition at line 1099 of file GA_Detail.h.
|
inline |
Definition at line 1250 of file GA_Detail.h.
|
inline |
Definition at line 1260 of file GA_Detail.h.
|
inline |
Definition at line 1051 of file GA_Detail.h.
|
inline |
Definition at line 1055 of file GA_Detail.h.
|
inline |
Definition at line 1109 of file GA_Detail.h.
|
inline |
Definition at line 1113 of file GA_Detail.h.
|
inline |
Definition at line 1256 of file GA_Detail.h.
|
inline |
Definition at line 1266 of file GA_Detail.h.
bool GA_Detail::findUnusedPoints | ( | GA_OffsetList * | unused = nullptr | ) | const |
Returns true if there are any unused points. If the offset list is given, it is set to all of the found unused points.
|
inline |
Definition at line 1044 of file GA_Detail.h.
|
inline |
Definition at line 1048 of file GA_Detail.h.
|
inline |
Definition at line 1102 of file GA_Detail.h.
|
inline |
Definition at line 1106 of file GA_Detail.h.
|
inline |
Definition at line 1253 of file GA_Detail.h.
|
inline |
Definition at line 1263 of file GA_Detail.h.
|
staticprotected |
void GA_Detail::flushCECaches | ( | ) |
Flush all GPU-backed CE attributes, clearing them from this geometry.
void GA_Detail::flushCEWriteCaches | ( | ) |
All GPU buffers that have been written to will be copied back to the CPU & marked clean.
|
inlinestatic |
Definition at line 1621 of file GA_Detail.h.
|
inlinestatic |
Definition at line 1678 of file GA_Detail.h.
|
inline |
Calls functor on every active point offset. This is easiest to use with C++ lambdas, e.g.: detail.forEachPoint([&vec,&detail](GA_Offset ptoff) { vec += detail.getPos3(ptoff); });
Definition at line 1507 of file GA_Detail.h.
|
inline |
Calls functor on every point offset in a group. This is easiest to use with C++ lambdas, e.g.: detail.forEachPoint(group, [&vec,&detail](GA_Offset ptoff) { vec += detail.getPos3(ptoff); });
Definition at line 1519 of file GA_Detail.h.
|
inline |
Calls functor on every point offset in a group, (or not in a group if complement is true).
Definition at line 1528 of file GA_Detail.h.
|
inline |
Like forEachPoint, except taking a functor that returns true to continue, and false to break.
Definition at line 1538 of file GA_Detail.h.
|
inline |
Like forEachPoint, except taking a functor that returns true to continue, and false to break.
Definition at line 1544 of file GA_Detail.h.
|
inline |
Like forEachPoint, except taking a functor that returns true to continue, and false to break.
Definition at line 1550 of file GA_Detail.h.
|
inline |
Calls functor on every active primitive offset. This is easiest to use with C++ lambdas, e.g.: detail.forEachPrimitive([&tris,&detail](GA_Offset primoff) { if (detail.getPrimitiveMap().getTypeId(primoff) != GA_PRIMPOLY) return; GA_OffsetListRef vertices = detail.getPrimitiveMap().getVertexList(primoff); if (vertices.size() == 3 && vertices.getExtraFlag()) tris.addOffset(primoff); });
Definition at line 1567 of file GA_Detail.h.
|
inline |
Calls functor on every primitive offset in a group. This is easiest to use with C++ lambdas, e.g.: detail.forEachPrimitive(group, [&tris,&detail](GA_Offset primoff) { if (detail.getPrimitiveMap().getTypeId(primoff) != GA_PRIMPOLY) return; GA_OffsetListRef vertices = detail.getPrimitiveMap().getVertexList(primoff); if (vertices.size() == 3 && vertices.getExtraFlag()) tris.addOffset(primoff); });
Definition at line 1583 of file GA_Detail.h.
|
inline |
Calls functor on every primitive offset in a group, (or not in a group if complement is true).
Definition at line 1592 of file GA_Detail.h.
|
inline |
Like forEachPrimitive, except taking a functor that returns true to continue, and false to break.
Definition at line 1602 of file GA_Detail.h.
|
inline |
Like forEachPrimitive, except taking a functor that returns true to continue, and false to break.
Definition at line 1608 of file GA_Detail.h.
|
inline |
Like forEachPrimitive, except taking a functor that returns true to continue, and false to break.
Definition at line 1614 of file GA_Detail.h.
|
inlinestatic |
Utility casting functions used by GA_GBMacros.h to maintain (source code) type compatibility with the old implementations that used the derived GD/GEO_PrimList objects.
The first argument is used solely to infer the templatized type. Derived classes (GD_Detail/GEO_Detail) should contain embedded GB_MACRO_PRIM_TYPE typedef to specify the proper derived type to use for the cast.
Definition at line 2219 of file GA_Detail.h.
|
inlinestatic |
Utility casting functions used by GA_GBMacros.h to maintain (source code) type compatibility with the old implementations that used the derived GD/GEO_PrimList objects.
The first argument is used solely to infer the templatized type. Derived classes (GD_Detail/GEO_Detail) should contain embedded GB_MACRO_PRIM_TYPE typedef to specify the proper derived type to use for the cast.
Definition at line 2222 of file GA_Detail.h.
bool GA_Detail::getAttributeAsArray | ( | const GA_Attribute * | atr, |
const GA_Range & | range, | ||
UT_Array< T > & | result | ||
) | const |
Get/set all the point attribute data from/to a contiguous array.
Valid types for T are: int32, int64, fpreal32, fpreal64, UT_Vector2T<S>, UT_Vector3T<S>, UT_Vector4T<S>, UT_QuaternionT<S>, UT_Matrix3T<S>, UT_Matrix4T<S> where S is one of: fpreal, fpreal32, fpreal64, For the UT_Vector classes, S can also be one of: int, int32, int64
|
inline |
Get access to the attributes for one element type
Definition at line 835 of file GA_Detail.h.
GA_AttributeOwner GA_Detail::getAttributeOwner | ( | const GA_AttributeDict & | dict | ) | const |
Get access to the attributes for one element type
|
inline |
Definition at line 799 of file GA_Detail.h.
|
inline |
Definition at line 800 of file GA_Detail.h.
void GA_Detail::getEdgeGroupList | ( | UT_Array< const GA_EdgeGroup * > & | list | ) | const |
void GA_Detail::getEdgeGroupList | ( | UT_Array< GA_EdgeGroup * > & | list | ) |
void GA_Detail::getElementGroupList | ( | GA_AttributeOwner | owner, |
UT_Array< const GA_ElementGroup * > & | list | ||
) | const |
void GA_Detail::getElementGroupList | ( | GA_AttributeOwner | owner, |
UT_Array< GA_ElementGroup * > & | list | ||
) |
const GA_ElementGroupTable& GA_Detail::getElementGroupTable | ( | GA_AttributeOwner | owner | ) | const |
|
inline |
Definition at line 1166 of file GA_Detail.h.
|
inline |
Definition at line 747 of file GA_Detail.h.
|
inline |
Get a range representing the global (detail) data.
Definition at line 1771 of file GA_Detail.h.
GA_GroupTable* GA_Detail::getGroupTable | ( | GA_GroupType | group_type | ) |
const GA_GroupTable* GA_Detail::getGroupTable | ( | GA_GroupType | group_type | ) | const |
const GA_IndexMap& GA_Detail::getIndexMap | ( | GA_AttributeOwner | owner | ) | const |
|
inline |
Definition at line 738 of file GA_Detail.h.
const GA_AttributeInstanceMatrix& GA_Detail::getInstanceMatrix | ( | ) | const |
Return cached attribute instance matrix pointer.
GA_Size GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_String & | val | ||
) | const |
Get the value of a global/detail intrinsic. These methods return the number of items retrieved.
GA_Size GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_StringArray & | val | ||
) | const |
Get the value of a global/detail intrinsic. These methods return the number of items retrieved.
GA_Size GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_OptionsHolder & | val | ||
) | const |
Get the value of a global/detail intrinsic. These methods return the number of items retrieved.
GA_Size GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Array< UT_OptionsHolder > & | val | ||
) | const |
Get the value of a global/detail intrinsic. These methods return the number of items retrieved.
GA_Size GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
int64 * | v, | ||
GA_Size | size | ||
) | const |
Get the value of a global/detail intrinsic. These methods return the number of items retrieved.
GA_Size GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
fpreal64 * | v, | ||
GA_Size | sz | ||
) | const |
Get the value of a global/detail intrinsic. These methods return the number of items retrieved.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
float & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
int & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Vector2 & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Vector3 & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Vector4 & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Matrix2 & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Matrix3 & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Matrix4 & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
double & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
int64 & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Vector2D & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Vector3D & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Vector4D & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Matrix2D & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Matrix3D & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
bool GA_Detail::getIntrinsic | ( | GA_LocalIntrinsic | h, |
UT_Matrix4D & | v | ||
) | const |
Get the value of a global/detail intrinsic. Returns false if not the right type or not found. Always will clear out the provided value.
|
inline |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
Definition at line 1440 of file GA_Detail.h.
|
inline |
Get the intrinsic manager for global/detail intrinsics.
At the current time, these include:
Definition at line 1421 of file GA_Detail.h.
|
inline |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
Definition at line 1437 of file GA_Detail.h.
|
inline |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
Definition at line 1447 of file GA_Detail.h.
|
inline |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
Definition at line 1445 of file GA_Detail.h.
|
inline |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
Definition at line 1443 of file GA_Detail.h.
GA_Size GA_Detail::getIntrinsicTupleSize | ( | GA_LocalIntrinsic | h | ) | const |
Query properties of the global/detail intrinsic Note that the tuple size calls the virtual method since the tuple size may be dynamic (i.e. basis knot vector). This also means that to know whether a single component tuple should collapse to a scalar value, you need to call the getIntrinsicCollapseSingletons method.
|
inline |
Get a list of all the IO names registered. Returns the number of names in the array.
Definition at line 1965 of file GA_Detail.h.
|
virtual |
Compute memory usage (includes all shared memory)
Reimplemented in GEO_Detail, GD_Detail, GU_Detail, GEO_Profiles, and GOP_Guide.
|
inline |
Definition at line 2378 of file GA_Detail.h.
|
inline |
This will be an exclusive, possibly loose, upper bound when iterating over point offsets. Every point offset in this detail will be strictly less than this.
Definition at line 341 of file GA_Detail.h.
|
inline |
Return the number of points.
Definition at line 334 of file GA_Detail.h.
|
inline |
This will be an exclusive, possibly loose, upper bound when iterating over primitive offsets. Every primitive offset in this detail will be strictly less than this.
Definition at line 415 of file GA_Detail.h.
|
inline |
Return the number of primitives.
Definition at line 408 of file GA_Detail.h.
|
inline |
This will be an exclusive, possibly loose, upper bound when iterating over vertex offsets. Every vertex offset in this detail will be strictly less than this.
Definition at line 511 of file GA_Detail.h.
|
inline |
Return the number verticies in the entire detail.
Definition at line 504 of file GA_Detail.h.
|
inline |
Convenience method to access the P attribute.
Definition at line 164 of file GA_Detail.h.
|
inline |
Definition at line 165 of file GA_Detail.h.
|
inline |
Definition at line 744 of file GA_Detail.h.
|
inline |
Get a range of all points in the detail.
Definition at line 1738 of file GA_Detail.h.
|
inline |
Get ordered point range from base_ptnum to end_ptnum, or the end.
Definition at line 1745 of file GA_Detail.h.
|
inline |
The ptoff passed is the point offset.
Definition at line 173 of file GA_Detail.h.
|
inline |
Definition at line 178 of file GA_Detail.h.
|
inline |
The ptoff passed is the point offset.
Definition at line 185 of file GA_Detail.h.
|
inline |
Get an array of all positions from the given point range. The template parameter T is must be one of: fpreal, fpreal32, or fpreal64.
Definition at line 207 of file GA_Detail.h.
|
inline |
Definition at line 190 of file GA_Detail.h.
|
inline |
Definition at line 196 of file GA_Detail.h.
|
inline |
The ptoff passed is the point offset.
Definition at line 292 of file GA_Detail.h.
|
inline |
Definition at line 296 of file GA_Detail.h.
GA_Precision GA_Detail::getPreferredPrecision | ( | ) | const |
The preferred precision for both computation and creation of attributes. Default precision is 32bit.
|
inline |
|
inline |
Get the primitive by offset
Definition at line 432 of file GA_Detail.h.
|
inline |
Get the primitive by index
Definition at line 438 of file GA_Detail.h.
|
inline |
Get the primitive by index
Definition at line 440 of file GA_Detail.h.
SYS_FORCE_INLINE bool GA_Detail::getPrimitiveClosedFlag | ( | GA_Offset | primoff | ) | const |
Returns the "closed" flag for polygon, NURBS curve, or Bezier curve primitives, or false for other primitive types. You must include GA_Primitive.h to use this.
Definition at line 919 of file GA_Primitive.h.
|
inline |
Provide access to the factory. This allows users to query information about factories.
Definition at line 2255 of file GA_Detail.h.
|
inline |
Definition at line 795 of file GA_Detail.h.
|
inline |
Definition at line 797 of file GA_Detail.h.
|
inline |
Definition at line 746 of file GA_Detail.h.
|
inline |
Get a range of all primitives in the detail.
Definition at line 1741 of file GA_Detail.h.
|
inline |
Get ordered primitive range from base_prim to end_prim, or the end.
Definition at line 1756 of file GA_Detail.h.
|
inline |
Definition at line 2306 of file GA_Detail.h.
GA_Size GA_Detail::getPrimitivesReferencingPoint | ( | GA_OffsetArray & | primitives, |
GA_Offset | point_offset | ||
) | const |
Given a point offset, return a list of all primitives which reference it. The primitive offsets will be in ascending order and have no duplicates, so you can do: detail.getPrimitivesReferencingPoint(prims0, p0off); detail.getPrimitivesReferencingPoint(prims1, p1off); prims0.sortedIntersection(prims1); to quickly get a list of primitives that contain both p0off and p1off, (not necessarily as an edge, but this can be used as a first pass check.)
SYS_FORCE_INLINE int GA_Detail::getPrimitiveTypeId | ( | GA_Offset | primoff | ) | const |
Returns the type ID of the primitive at the specified primitive offset. You must include GA_Primitive.h to use this.
Definition at line 912 of file GA_Primitive.h.
GA_PrimitiveTypeMask GA_Detail::getPrimitiveTypeMask | ( | const GA_PrimitiveGroup * | group = 0 | ) | const |
Returns the primitive typemask that represents all primitives in this detail.
GA_PrimitiveTypeMask GA_Detail::getPrimitiveTypeMaskAll | ( | ) | const |
Returns a primitive typemask that represents all known primitive type by the primitive factory that is associated with this detail.
SYS_FORCE_INLINE GA_Size GA_Detail::getPrimitiveVertexCount | ( | GA_Offset | primoff | ) | const |
Returns the number of vertices in the primitive at the specified primitive offset. You must include GA_Primitive.h to use this.
Definition at line 898 of file GA_Primitive.h.
SYS_FORCE_INLINE GA_OffsetListRef GA_Detail::getPrimitiveVertexList | ( | GA_Offset | primoff | ) | const |
Returns a shallow copy of the vertex list of the primitive at the specified primitive offset. You must include GA_Primitive.h to use this.
Definition at line 891 of file GA_Primitive.h.
SYS_FORCE_INLINE GA_Offset GA_Detail::getPrimitiveVertexOffset | ( | GA_Offset | primoff, |
GA_Size | i | ||
) | const |
Returns the vertex offset in the primitive at the specified primitive offset in vertex list position i. If you're accessing all vertex offsets, it'll be faster to call getVertexList() once and either read from that or call forEach(fucntor) on it. You must include GA_Primitive.h to use this.
Definition at line 905 of file GA_Primitive.h.
|
inline |
NOTE: This will usually return nullptr, because very few things actually set the homogenous coordinate to anything other than 1.0, in which case, the attribute won't be created.
Definition at line 281 of file GA_Detail.h.
|
inline |
NOTE: This will usually return nullptr, because very few things actually set the homogenous coordinate to anything other than 1.0, in which case, the attribute won't be created.
Definition at line 285 of file GA_Detail.h.
|
inline |
Definition at line 801 of file GA_Detail.h.
|
inline |
Definition at line 802 of file GA_Detail.h.
GA_CEAttribute* GA_Detail::getTopologyCEAttribute | ( | GA_Topology::TopologyCE | topotype, |
GA_StorageClass | storage, | ||
GA_Precision | precision, | ||
int & | tuplesize, | ||
bool | isarray, | ||
bool | read, | ||
bool | write | ||
) |
Builds & acquires GPU backed buffers for topology attributes.
|
inline |
Definition at line 117 of file GA_Detail.h.
|
inline |
Definition at line 745 of file GA_Detail.h.
|
inline |
Get a range of all vertices in the detail.
Definition at line 1768 of file GA_Detail.h.
GA_Offset GA_Detail::getVertexReferencingPoint | ( | GA_Offset | ptoff, |
GA_Offset | primoff = GA_INVALID_OFFSET |
||
) | const |
Given a point and primitive, find the corresponding vertex. Note that this is O(N) on the number of vertices which share the point. If the primitive offset is -1, then the "first" vertex which references the point will be returned. The order of the "first" vertex is arbitrary, though it will likely be the same for each call.
Returns -1 if no topology attributes exist.
GA_Size GA_Detail::getVerticesReferencingPoint | ( | GA_OffsetArray & | vertices, |
GA_Offset | point_offset | ||
) | const |
Given a point offset, return a list of all vertices which reference it. NOTE: The vertex offsets might be in ANY order, and may even be different from run to run, so DO NOT rely on the order!
bool GA_Detail::hasNoSharedPoints | ( | ) | const |
Returns false if any point is shared, ie, more than one vertex points to the same point. This being true means each point has at most one vertex and belongs to at most one primitive. Note that points can belong to zero vertices and zero primitives still. Requires topology.
|
inline |
Definition at line 2377 of file GA_Detail.h.
bool GA_Detail::isEmpty | ( | ) | const |
Returns true if the detail is empty. This is not just having zero points/primitives, but also only having trivial attributes.
|
inline |
Determine if we've bound 64-bit position. Relies on double being alternate binding of our handle. Esoteric position attribute types will confuse this
Definition at line 170 of file GA_Detail.h.
bool GA_Detail::isPointUsed | ( | GA_Offset | point | ) | const |
Returns whether a point is referenced by any vertices This may be a slow operation if there is no topology allocated
|
inline |
Returns if a point is referenced. Fails catastrophically if you do not have full topology.
Definition at line 723 of file GA_Detail.h.
|
inline |
This function is entirely here so that GA has a way to check if a GA_Detail is a GEO_Detail (true) or GD_Detail (false).
Definition at line 2331 of file GA_Detail.h.
IOStatus GA_Detail::load | ( | const char * | filename, |
const GA_LoadOptions * | opts = 0 , |
||
UT_StringArray * | errors = 0 |
||
) |
Load a geometry file.
IOStatus GA_Detail::load | ( | UT_IStream & | is, |
const GA_LoadOptions * | opts = 0 , |
||
UT_StringArray * | errors = 0 |
||
) |
Load a geometry file given a UT_IStream.
IOStatus GA_Detail::load | ( | UT_JSONParser & | p, |
const GA_LoadOptions * | opts = 0 , |
||
UT_StringArray * | errors = 0 |
||
) |
Load geometry from a JSON stream.
findIO(GA_IOTable::getJSONToken())
and uses a dynamic cast to GA_IOJSON to actually do the loading.
|
static |
Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.
|
protected |
bool GA_Detail::loadVertexH9 | ( | UT_IStream & | is, |
GA_Offset | vertex_offset, | ||
const UT_Array< GA_AttribLoadDataH9 > & | vtx_l | ||
) |
Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
protectedvirtual |
Virtual implementation of intrinsic attributes. See GA_IntrinsicEval for further details.
Reimplemented in GEO_Detail.
|
inline |
Definition at line 2396 of file GA_Detail.h.
|
inline |
Definition at line 2398 of file GA_Detail.h.
Merge global attributes (using default options)
void GA_Detail::mergeGlobalAttributes | ( | const GA_Detail & | src, |
GA_MergeOptions & | options | ||
) |
Merge source global attributes using options.
|
inline |
Be sure to do "delete group;" to clean it up.
Definition at line 1356 of file GA_Detail.h.
|
inline |
Creates a detached group with no name, owned by the caller. NOTE: The detail knows nothing about any detached groups that are created so these become invalid if the detail is modified.
Be sure to do "delete group;" to clean it up.
Definition at line 1338 of file GA_Detail.h.
|
inline |
Be sure to do "delete group;" to clean it up.
Definition at line 1344 of file GA_Detail.h.
|
inline |
Be sure to do "delete group;" to clean it up.
Definition at line 1350 of file GA_Detail.h.
|
inline |
Creates a non-internal group with the specified name, owned by this detail.
Definition at line 1303 of file GA_Detail.h.
|
inline |
TODO: Deprecate internal groups with user-specified names.
Definition at line 1393 of file GA_Detail.h.
|
inline |
Creates an internal group with a unique name, owned by this detail. Be sure to call GA_Detail::destroyGroup (or destroyElementGroup) with this group to clean it up.
Definition at line 1326 of file GA_Detail.h.
|
inline |
Creates an internal group with a unique name, owned by this detail. Be sure to call GA_Detail::destroyGroup (or destroyElementGroup) with this group to clean it up.
Definition at line 1314 of file GA_Detail.h.
|
inline |
Creates an internal group with a unique name, owned by this detail. Be sure to call GA_Detail::destroyGroup (or destroyElementGroup) with this group to clean it up.
Definition at line 1322 of file GA_Detail.h.
|
inline |
Creates an internal group with a unique name, owned by this detail. Be sure to call GA_Detail::destroyGroup (or destroyElementGroup) with this group to clean it up.
Definition at line 1318 of file GA_Detail.h.
|
inline |
Creates a non-internal group with the specified name, owned by this detail.
Definition at line 1291 of file GA_Detail.h.
|
inline |
TODO: Deprecate internal groups with user-specified names.
Definition at line 1381 of file GA_Detail.h.
|
inline |
Creates a non-internal group with the specified name, owned by this detail.
Definition at line 1299 of file GA_Detail.h.
|
inline |
TODO: Deprecate internal groups with user-specified names.
Definition at line 1385 of file GA_Detail.h.
|
inline |
Creates a non-internal group with the specified name, owned by this detail.
Definition at line 1295 of file GA_Detail.h.
|
inline |
TODO: Deprecate internal groups with user-specified names.
Definition at line 1389 of file GA_Detail.h.
|
inline |
Access point, primitive, vertex, or edge group tables
Definition at line 1179 of file GA_Detail.h.
|
inline |
Access point, primitive, vertex, or edge group tables
Definition at line 1181 of file GA_Detail.h.
|
inline |
Given a point's data offset, return its index.
Definition at line 349 of file GA_Detail.h.
|
inline |
Given a point's index (in append order), return its data offset.
Definition at line 345 of file GA_Detail.h.
|
inline |
Given a point, returns a vertex that it references. More than one vertex may refer to a single point, and it is quite possible that no vertices refer to the point. GA_INVALID_OFFSET is returned if no vertices match. See getVerticesReferencingPoint() for methods to get all the points.
Definition at line 559 of file GA_Detail.h.
|
inline |
Access point, primitive, vertex, or edge group tables
Definition at line 1183 of file GA_Detail.h.
|
inline |
Access point, primitive, vertex, or edge group tables
Definition at line 1185 of file GA_Detail.h.
|
inline |
Given a primitive's data offset, return its index.
Definition at line 423 of file GA_Detail.h.
|
inline |
Given a primitive's index (in append order), return its data offset.
Definition at line 419 of file GA_Detail.h.
|
static |
Debugging output of detail.
|
inlineprotectedvirtual |
This is here just so that GA_AttributeSet::jsonSave() can call GEOcomputeNormals()
Reimplemented in GEO_Detail.
Definition at line 2458 of file GA_Detail.h.
void GA_Detail::refreshCachedAttributes | ( | ) |
Refreshes the cached myP attribute.
|
virtual |
Refreshes handles cached in the detail. This method must be called after changing the storage of the P attribute.
|
static |
Register global intrinsics. Each subclass should have registration which looks like:
|
inline |
Register an IO file format.
Definition at line 1955 of file GA_Detail.h.
bool GA_Detail::removeTailInitializer | ( | GA_Attribute * | attrib | ) |
Add/Remove an attribute to the tail-initialization list.
When attributes grow in size, they usually initialize their values to the default value. However, some attributes may not adhere to this rule, or due to space optimizations, may have the values set to non-default values. In this case, they should be added to the tail-initialization list. When new elements are appended to the detail, they will be told to re-initialize the new element. Otherwise, the detail will assume that the element values are at their default value.
When removing, the method will return true
if the attribute was a tail initializer.
|
inline |
Definition at line 947 of file GA_Detail.h.
Reorder a point. The index of the point at the given data offset will be changed to the new order (provided that the ordered position is in a valid range).
Reorder a primitive. The index of the primitive at the given data offset will be changed to the new order (provided that the ordered position is in a valid range).
void GA_Detail::replaceWith | ( | const GA_Detail & | src, |
const GA_AttributeFilter * | skip = nullptr , |
||
bool | full_copy = false |
||
) |
Fast version of merge for the common case of completely replacing all of this detail with the source detail, using data IDs to avoid copying things that are the same. This does not copy private scope attributes (except topology) or internal groups. When skip is given, all processing of attributes matching the filter will be skipped. The result is that skipped attributes may or may not exist afterwards, and they also won't be initialized in any expected way. The assumption is that the caller will fully handle creation, initialization, or deletion of skipped attributes. If 'full_copy is true, internal groups and private attribute are also considered.'
void GA_Detail::replaceWithPoints | ( | const GA_Detail & | src, |
const GA_AttributeFilter * | skip = nullptr |
||
) |
Fast version of merge for the case of completely replacing all of this detail with the points from the source detail, using data IDs to avoid copying things that are the same. This does not copy private scope attributes (except topology) or internal groups. It will act as if replaceWith was called and then all primitives were deleted, so vertex/primitive attributes will be transferred, but there will be no vertices or primitives. When skip is given, all processing of attributes matching the filter will be skipped. The result is that skipped attributes may or may not exist afterwards, and they also won't be initialized in any expected way. The assumption is that the caller will fully handle creation, initialization, or deletion of skipped attributes.
IOStatus GA_Detail::save | ( | const char * | filename, |
const GA_SaveOptions * | options, | ||
UT_StringArray * | errors = 0 |
||
) | const |
Save to a given filename. An extension of .gz will enable zlib compression (for JSON format only) Options include:
IOStatus GA_Detail::save | ( | std::ostream & | os, |
bool | binary, | ||
const GA_SaveOptions * | options, | ||
UT_StringArray * | errors = 0 |
||
) | const |
Save to an existing ostream. JSON format will check the options for:
IOStatus GA_Detail::save | ( | UT_JSONWriter & | w, |
const GA_SaveOptions * | opts = 0 |
||
) | const |
The JSON schema for a detail can be broken down into 5 major sections
findIO(GA_IOTable::getJSONToken())
and uses a dynamic cast to GA_IOJSON to actually do the writing.
|
static |
Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.
IOStatus GA_Detail::saveClassic | ( | const char * | , |
const GA_SaveOptions * | |||
) | const |
Save in "hclassic" format.
IOStatus GA_Detail::saveClassic | ( | std::ostream & | os, |
bool | , | ||
const GA_SaveOptions * | |||
) | const |
Save in "hclassic" format.
|
protected |
bool GA_Detail::saveVertexH9 | ( | std::ostream & | os, |
int | binary, | ||
GA_Offset | vertex_offset, | ||
const UT_Array< GA_AttribSaveDataH9 > & | vtx_l | ||
) | const |
Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.
bool GA_Detail::saveVertexPointReferenceH9 | ( | std::ostream & | os, |
int | binary, | ||
GA_Offset | vertex_offset | ||
) | const |
Convenience methods for saving/loading both a vertex's point reference and its attribute values in a Houdini9 compatible style. Note that the load wires the vertex to the loaded point.
bool GA_Detail::setAttributeFromArray | ( | GA_Attribute * | atr, |
const GA_Range & | range, | ||
const UT_Array< T > & | src | ||
) |
Valid types for T are: int32, int64, fpreal32, fpreal64, UT_Vector2T<S>, UT_Vector3T<S>, UT_Vector4T<S>, UT_QuaternionT<S>, UT_Matrix3T<S>, UT_Matrix4T<S> where S is one of: fpreal, fpreal32, fpreal64, For the UT_Vector classes, S can also be one of: int, int32, int64
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const char * | value | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const UT_StringArray & | value | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const char ** | val, | ||
GA_Size | s | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const UT_OptionsHolder & | val | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const UT_Array< UT_OptionsHolder > & | value | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const UT_OptionsHolder * | val, | ||
GA_Size | s | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const int64 | val | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const fpreal64 | val | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const int64 * | val, | ||
GA_Size | sz | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
GA_Size GA_Detail::setIntrinsic | ( | GA_LocalIntrinsic | h, |
const fpreal64 * | v, | ||
GA_Size | sz | ||
) |
Set intrinsic. This will fail if the intrinsic is read-only. These methods return the number of items set.
|
inline |
Definition at line 2400 of file GA_Detail.h.
Definition at line 2475 of file GA_Detail.h.
|
inline |
Set P from a UT_Vector2.
Definition at line 225 of file GA_Detail.h.
|
inline |
Definition at line 230 of file GA_Detail.h.
|
inline |
Set P from a UT_Vector3.
Definition at line 237 of file GA_Detail.h.
|
inline |
Definition at line 242 of file GA_Detail.h.
Set P given the x, y, z components.
Definition at line 248 of file GA_Detail.h.
|
inline |
Get an array of all positions from the given point range. The template parameter T is must be one of: fpreal, fpreal32, or fpreal64.
Definition at line 217 of file GA_Detail.h.
|
inline |
|
inline |
Definition at line 307 of file GA_Detail.h.
Set P given the x, y, z, w components.
Definition at line 313 of file GA_Detail.h.
void GA_Detail::setPreferredPrecision | ( | GA_Precision | prec | ) |
Override the preferred precision. Currently will accept 32 and 64bit.
SYS_FORCE_INLINE void GA_Detail::setPrimitiveClosedFlag | ( | GA_Offset | primoff, |
bool | closed | ||
) |
Sets the "closed" flag for polygon primitives. For NURBS curve or Bezier curve primitives, use GEO_Face::close() or GEO_Face::open(). You must include GA_Primitive.h to use this.
Definition at line 926 of file GA_Primitive.h.
Definition at line 2474 of file GA_Detail.h.
Given a vertex, set the corresponding point offset.
Definition at line 536 of file GA_Detail.h.
void GA_Detail::sortVertexMapByPrimitiveUse | ( | ) |
Optimized layout of vertex index map. This sorts the vertex index map by the primitive order use. The map will be defragmented after this function is called.
|
protected |
This is here so that GA_AttributeSet::jsonLoad() can call it after loading attributes, since VDB primitive loading tries to write to P, and we might as well have it correctly split up before anything might read/write it.
|
inline |
These two functions should be used instead of the more destructive clearAndDestroy() when it it likely the geometry it relatively stable between operations
Definition at line 138 of file GA_Detail.h.
IOStatus GA_Detail::stat | ( | UT_JSONParser & | p, |
GA_Stat & | stat, | ||
uint | level | ||
) | const |
Stat a disk file rather than loading the entire geometry. (see GA_STAT_LEVEL) The method cannot be static since the primitive factory is required. The primitive factory stores the IO table for the geometry.
When performing a stat on a disk file, if the format supports it, only the header of the file is loaded. This means that the full information for the geometry isn't available. Thus, this will give you different information than if you run stat() on geometry that's fully loaded into memory.
If you inspect a .geo file, you can see the information that's available. For example, you can get the "primcount_summary" using the GA_Stat::getInfoOptions() method.
Get information about the detail.
stat | - Information about detail |
level | - Mask of information to retrieve (see GA_STAT_LEVEL) Note that since this method queries the geometry that's fully loaded into memory, you will get different information than the statFile() method. |
Fill out only the attribute information on the stat.
IOStatus GA_Detail::statFile | ( | const char * | filename, |
GA_Stat & | stat, | ||
uint | level = 0xffff , |
||
const GA_LoadOptions * | opts = nullptr |
||
) | const |
Stat a disk file rather than loading the entire geometry. (see GA_STAT_LEVEL) The method cannot be static since the primitive factory is required. The primitive factory stores the IO table for the geometry.
When performing a stat on a disk file, if the format supports it, only the header of the file is loaded. This means that the full information for the geometry isn't available. Thus, this will give you different information than if you run stat() on geometry that's fully loaded into memory.
If you inspect a .geo file, you can see the information that's available. For example, you can get the "primcount_summary" using the GA_Stat::getInfoOptions() method.
Fill out only the group information on the stat.
Fill out only the volume information.
Reimplemented in GU_Detail.
Steal all GPU-backed CE buffers from the source detail, including attributes, VDBs, and volumes. NOTE: this is only safe to call immediately after flushing the source detail's write cache with flushCEWriteCache, then calling replaceWith.
Swap the order of the two specified primitive data offsets.
|
inline |
Apply a translation to the specified point index.
Definition at line 256 of file GA_Detail.h.
|
inline |
Definition at line 261 of file GA_Detail.h.
|
inline |
Access point, primitive, vertex, or edge group tables
Definition at line 1187 of file GA_Detail.h.
|
inline |
Access point, primitive, vertex, or edge group tables
Definition at line 1189 of file GA_Detail.h.
|
inline |
Given a vertex's data offset, return its index.
Definition at line 519 of file GA_Detail.h.
|
inline |
Given a vertex's index (in append order), return its data offset.
Definition at line 515 of file GA_Detail.h.
|
inline |
Given a vertex, return the point it references.
Definition at line 529 of file GA_Detail.h.
|
inline |
Given a vertex, return primitive it references Returns -1 if no topology attributes exist.
Definition at line 545 of file GA_Detail.h.
|
inline |
Given a vertex, returns the next one that shares the same point as this vertex. GA_INVALID_OFFSET if no further vertices match
Definition at line 571 of file GA_Detail.h.
|
inline |
Given a vertex, returns the previous one that shares the same point as this vertex. GA_INVALID_OFFSET if no further vertices match
Definition at line 583 of file GA_Detail.h.
|
friend |
Definition at line 2455 of file GA_Detail.h.
|
friend |
Definition at line 2508 of file GA_Detail.h.
|
friend |
Definition at line 2509 of file GA_Detail.h.
|
static |
Definition at line 2375 of file GA_Detail.h.