PointsDCCConversion.kl

Types

Points (object)

The Points object implements a point cloud geometry. All its data is contained in its GeometryAttributes container that can be retrieved by calling Points.getAttributes.

Point sizes

A size attribute can be defined by Points.getOrCreateSizesAttribute or Points.setSizesAttribute. This attribute will then be used by helpers such as Points.getSize, and the point bounding spheres defined by the size will be used to compute points’ volume for SpatialQueryable functions such as Points.raycast.

If no size attribute is defined, the Points.defaultPointSize constant will be used as the size for all points.

Members

GeometryAttributes attributes Container for all attributes.
String debugName Name that will be printed in descriptions.
UInt32 structureVersion Version of the geometry structure itself, excluding the GeometryAttributes content.
Boolean computeGPUBoundingVolume If positions are on the GPU: if true, the bounding volume is computed, else an infinite bbox is returned.
ThreadsafeMetaDataContainer metaData Container for holding various user data (Geometry specific), such as the BoundingBox cache data, or raycast acceleration structures and data (Octree).
Scalar defaultPointSize used for get/setSize if sizesAttribute is not specified (see Point sizes)
Ref<ScalarAttribute> sizesAttribute used for get/setSize if specified (see Point sizes)
/*
** Example: Points
*/

require Geometry;
  
operator entry() {

          
            Points points = Points();
            points.getOrCreateSizesAttribute();
          
            points.resize( 5 );
            for( Size i = 0; i < 5; ++i ) {
              points.setPointPosition( i, Vec3( 0, i, 0 ) );
              points.setSize( i, (i+1) * 0.1f );
            }
            report( points.getDesc(true, false) );
  
}

/*
** Output:

Points: Points pointCount: 5 nbAttributeVectors: 2
Attributes: nb elements = 5
  0: positions={x:+0.0,y:+0.0,z:+0.0} pointSizes=+0.1 
  1: positions={x:+0.0,y:+1.0,z:+0.0} pointSizes=+0.2 
  2: positions={x:+0.0,y:+2.0,z:+0.0} pointSizes=+0.3 
  3: positions={x:+0.0,y:+3.0,z:+0.0} pointSizes=+0.4 
  4: positions={x:+0.0,y:+4.0,z:+0.0} pointSizes=+0.5 



*/

Methods

  Points ( in Points other )
  Points ( in String debugName )
  Points ()
  _setPointsFromExternalArray ! ( in Float32 values<>, in Size components )
  _setPointsFromExternalArray_d ! ( in Float64 values<>, in Size components )
  addPlane ! ( in Xfo xfo, in Scalar length, in Scalar width, in Integer lengthRows, in Integer widthRows )
  addPoint ! ( in Vec3 pos )
Size addPoints ! ( in Size count )
  addPoints ! ( in Vec3 positions[] )
  applyTransform ! ( in Mat44 transform )
  applyTransform ! ( in Xfo transform )
  clear ! ()
Points clone ? ()
  cloneMembersTo ? ( io Points that )
  convertToCPU ! ()
  convertToGPU ! ()
  copy ! ( in Geometry src )
  copy ! ( in Points src )
Size elementCount ? ()
Vec3[] getAllPointPositions ? ()
Ref<GeometryAttributes> getAttributes ? ()
LocalBoundingVolume getBoundingVolume ? ()
String getDebugName ? ()
String getDesc ? ( in Boolean withAttributes, in Boolean useUnitTestPrint )
LocalBoundingVolume getElementBoundingVolume ? ( in Size index )
UInt32 getMemType ? ()
Ref<ThreadsafeMetaDataContainer> getMetaData ? ()
Ref<ScalarAttribute> getOrCreateSizesAttribute ! ()
Vec3 getPointPosition ? ( in Size point )
Scalar getSize ? ( in Size point )
UInt32 getStructureVersion ? ()
UInt32 getVersion ? ()
  incrementPositionsVersion ! ()
  incrementSizesVersion ! ()
Size pointCount ? ()
  resize ! ( in Size newSize )
  setAllPointPositions ! ( in Vec3 positions[] )
  setPointPosition ! ( in Size point, in Vec3 position )
  setSize ! ( in Size point, in Scalar size )
  setSizesAttribute ! ( in Ref<ScalarAttribute> sizesAttribute )
Size size ? ()
ImportExportHelpers methods
  _getPointsAsExternalArray ? ( io Float32 values<>, in Size components )
  _getPointsAsExternalArray_d ? ( io Float64 values<>, in Size components )
SpatialQueryable methods
Boolean areGeometryLocationsEquivalent ? ( in GeometryLocation location0, in GeometryLocation location1 )
Ref<SpatialQuery> beginSpatialQuery ? ()
  endSpatialQuery ? ( in Ref<SpatialQuery> query )
GeometryLocation getClosest ? ( in Vec3 position, in Vec3 scaling, in Scalar maxUnscaledDistance )
  getLocationAttributeIndicesAndWeights ? ( in GeometryLocation location, io LocalL16UInt32Array attributeIndices, io LocalL16ScalarArray weights )
Vec3 getLocationBoundingSphereCoordinate ? ( in GeometryLocation location )
Size getLocationPointIndex ? ( in GeometryLocation location )
Vec3 getPositionAtLocation ? ( in GeometryLocation location )
Boolean isLocationAtPointCenter ? ( in GeometryLocation location )
  prepareForSpatialQueries ? ( in Size approximateNumberOfQueries, in GenericValueContainer options )
GeometryLocation raycast ? ( in Ray ray, in Boolean doubleSided, in Scalar coneThreshold, in Scalar maxDistance )
  removeSpatialQueryAcceleration ! ()