BRL-CAD
Collaboration diagram for Point Cloud:

Data Structures

struct  pnt
 
struct  pnt_color
 
struct  pnt_scale
 
struct  pnt_normal
 
struct  pnt_color_scale
 
struct  pnt_color_normal
 
struct  pnt_scale_normal
 
struct  pnt_color_scale_normal
 
struct  rt_pnts_internal
 

Macros

#define RT_PNTS_CK_MAGIC(_p)   BU_CKMAG(_p, RT_PNTS_INTERNAL_MAGIC, "rt_pnts_internal")
 

Enumerations

enum  rt_pnt_type {
  RT_PNT_TYPE_PNT = 0 , RT_PNT_TYPE_COL = 0+1 , RT_PNT_TYPE_SCA = 0+2 , RT_PNT_TYPE_NRM = 0+4 ,
  RT_PNT_TYPE_COL_SCA = 0+1+2 , RT_PNT_TYPE_COL_NRM = 0+1+4 , RT_PNT_TYPE_SCA_NRM = 0+2+4 , RT_PNT_TYPE_COL_SCA_NRM = 0+1+2+4 ,
  RT_PNT_UNKNOWN = 8
}
 

Detailed Description

Macro Definition Documentation

◆ RT_PNTS_CK_MAGIC

#define RT_PNTS_CK_MAGIC (   _p)    BU_CKMAG(_p, RT_PNTS_INTERNAL_MAGIC, "rt_pnts_internal")

Definition at line 967 of file geom.h.

Enumeration Type Documentation

◆ rt_pnt_type

ID_PNTS

Points are represented to a structure that contains exactly the data that it needs for that 'type' of point. The reason this was done over using something like a union was to fully optimize memory usage so that the maximum number of points could be stored without resorting to out-of-core techniques. A union is at least the size of the largest type and would have wasted memory.

By using this data-driven approach of type identification, it does result in needing to have a switching table for all supported types in order to access data. This could be avoided by storing them as multiple lists (wasting a few bytes for unused pointers) but is left as an exercise to the reader.

Enumerator
RT_PNT_TYPE_PNT 
RT_PNT_TYPE_COL 
RT_PNT_TYPE_SCA 
RT_PNT_TYPE_NRM 
RT_PNT_TYPE_COL_SCA 
RT_PNT_TYPE_COL_NRM 
RT_PNT_TYPE_SCA_NRM 
RT_PNT_TYPE_COL_SCA_NRM 
RT_PNT_UNKNOWN 

Definition at line 902 of file geom.h.