HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GU_PrimPart.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: GU_PrimParticle.h (C++)
7
*
8
* COMMENTS:
9
* Header file for GU_PrimParticle.h class...
10
*
11
*/
12
13
#ifndef __GU_PrimParticle_h__
14
#define __GU_PrimParticle_h__
15
16
#include "
GU_API.h
"
17
#include <
GEO/GEO_PrimPart.h
>
18
#include "
GU_Detail.h
"
19
20
class
UT_MemoryCounter
;
21
class
GEO_ConvertParms
;
22
23
/////////////////////////////////////////////////////////////
24
// //
25
// Class: GU_PrimParticle //
26
// Descr: This class is responsible for operations //
27
// done on particle primitives. As we need to //
28
// access the GU_Detail, the pointer is passed in //
29
// the constructor. //
30
// //
31
/////////////////////////////////////////////////////////////
32
33
class
GU_API
GU_PrimParticle
:
public
GEO_PrimParticle
34
{
35
protected
:
36
/// NOTE: Primitives should not be deleted directly. They are managed
37
/// by the GA_PrimitiveList and the stash.
38
~GU_PrimParticle
()
override
{}
39
40
public
:
41
/// NOTE: This constructor should only be called via GU_PrimitiveFactory.
42
GU_PrimParticle
(
GU_Detail
*gdp,
GA_Offset
offset
=
GA_INVALID_OFFSET
)
43
:
GEO_PrimParticle
(gdp,
offset
)
44
{}
45
46
/// Report approximate memory usage.
47
int64
getMemoryUsage
()
const override
;
48
49
/// Count memory usage using a UT_MemoryCounter in order to count
50
/// shared memory correctly.
51
/// NOTE: This should always include sizeof(*this).
52
void
countMemory
(
UT_MemoryCounter
&counter)
const override
;
53
54
const
GA_PrimitiveDefinition
&
getTypeDef
()
const override
55
{
56
UT_ASSERT
(theDefinition);
57
return
*theDefinition;
58
}
59
60
// Conversion Method
61
GEO_Primitive
*
convert
(
GEO_ConvertParms
&parms,
62
GA_PointGroup
*usedpts = 0)
override
;
63
GEO_Primitive
*
convertNew
(
GEO_ConvertParms
&parms)
override
;
64
65
void
normal
(NormalComp &output)
const override
;
66
void
normal
(NormalCompD &output)
const override
;
67
68
void
restrictedNormal(NormalComp &output,
69
const
UT_BitArray
&skip_pts)
const
;
70
71
// NOTE: For static member functions please call in the following
72
// manner. <ptrvalue> = GU_PrimParticle::<functname>
73
// i.e. partptr = GU_PrimParticle::build(params...);
74
75
// Optional Build Method
76
77
static
GU_PrimParticle
*build(
GU_Detail
*gdp,
GA_Size
numparts,
78
bool
appendPts =
true
);
79
80
void
clip
(
UT_Vector3
nml,
float
d = 0,
81
GA_PrimitiveGroup
*delgroup = 0)
override
;
82
83
private
:
84
void
create(
GA_Size
numparts);
85
86
static
GA_PrimitiveDefinition
*theDefinition;
87
friend
class
GU_PrimitiveFactory;
88
SYS_DEPRECATED_PUSH_DISABLE
()
89
};
90
SYS_DEPRECATED_POP_DISABLE
()
91
92
#endif
UT_BitArray
Definition:
UT_BitArray.h:29
GA_PrimitiveGroup
Definition:
GA_ElementGroup.h:74
SYS_DEPRECATED_PUSH_DISABLE
#define SYS_DEPRECATED_PUSH_DISABLE()
Definition:
SYS_Deprecated.h:62
UT_MemoryCounter
Definition:
UT_MemoryCounter.h:44
SYS_DEPRECATED_POP_DISABLE
#define SYS_DEPRECATED_POP_DISABLE()
Definition:
SYS_Deprecated.h:64
UT_Vector3T< float >
GA_Primitive::getMemoryUsage
virtual int64 getMemoryUsage() const
Definition:
GA_Primitive.h:209
GU_Detail.h
GA_PointGroup
Definition:
GA_ElementGroup.h:33
GA_Size
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition:
GA_Types.h:236
GA_INVALID_OFFSET
#define GA_INVALID_OFFSET
Definition:
GA_Types.h:687
GEO_Primitive::normal
virtual void normal(NormalComp &output) const =0
GA_Offset
GA_Size GA_Offset
Definition:
GA_Types.h:646
GEO_PrimPart.h
GEO_Primitive::clip
virtual void clip(UT_Vector3 normal, float distance=0, GA_PrimitiveGroup *clipgrp=NULL)
GU_PrimParticle::GU_PrimParticle
GU_PrimParticle(GU_Detail *gdp, GA_Offset offset=GA_INVALID_OFFSET)
NOTE: This constructor should only be called via GU_PrimitiveFactory.
Definition:
GU_PrimPart.h:42
offset
GLintptr offset
Definition:
glcorearb.h:665
GA_Primitive::countMemory
virtual void countMemory(UT_MemoryCounter &counter) const
GU_PrimParticle
Definition:
GU_PrimPart.h:33
int64
long long int64
Definition:
SYS_Types.h:116
GU_API
#define GU_API
Definition:
GU_API.h:14
GU_PrimParticle::getTypeDef
const GA_PrimitiveDefinition & getTypeDef() const override
Definition:
GU_PrimPart.h:54
GU_Detail
Definition:
GU_Detail.h:154
GEO_ConvertParms
Definition:
GEO_ConvertParms.h:99
GEO_PrimParticle
Definition:
GEO_PrimPart.h:55
GEO_Primitive::convert
virtual GEO_Primitive * convert(GEO_ConvertParms &parms, GA_PointGroup *usedpts=0)=0
GU_API.h
UT_ASSERT
#define UT_ASSERT(ZZ)
Definition:
UT_Assert.h:156
GA_PrimitiveDefinition
Definition of a geometric primitive.
Definition:
GA_PrimitiveDefinition.h:58
GU_PrimParticle::~GU_PrimParticle
~GU_PrimParticle() override
Definition:
GU_PrimPart.h:38
GEO_Primitive
Definition:
GEO_Primitive.h:41
GEO_Primitive::convertNew
virtual GEO_Primitive * convertNew(GEO_ConvertParms &parms)=0
GU
GU_PrimPart.h
Generated on Thu Nov 21 2024 02:43:40 for HDK by
1.8.6