-
首页
-
C4D R23.110 C++ SDK
HairCollider Class Reference
Library
»
头发
#include <lib_hair.h>
详细描述
Hair collider class.
-
注意
-
Has to be created with
Alloc()
and destroyed with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
Private Attributes
|
HairColliderData *
|
m_pData
|
构造函数 & 析构函数文档编制
◆
HairCollider()
◆
~HairCollider()
成员函数文档编制
◆
Alloc()
Allocates a hair collider. Destroy the allocated hair collider with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated hair collider, or
nullptr
if the allocation failed.
◆
Free()
Destructs hair colliders allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
p
|
The hair collider to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
Init()
Initializes the hair collider.
-
参数
-
[in]
|
hair
|
The hair to initialize with.
|
-
返回
-
true
if successful, otherwise
false
.
◆
Release()
Releases allocated memory. Called automatically by
Free()
.
◆
GetClosestPoint()
Int32
GetClosestPoint
|
(
|
const
向量
&
|
p
|
)
|
|
Gets the closest point to
p
.
-
参数
-
[in]
|
p
|
The point to search for.
|
-
返回
-
The closest point or
NOTOK
if an error occurred.
◆
GetClosestSegment()
Gets the closest segment to
p
.
-
参数
-
[in]
|
p
|
The point to search for.
|
[out]
|
guide
|
Assigned the guide index.
|
[out]
|
segment
|
Assigned the segment index.
|
[out]
|
segt
|
Assigned the segment t coordinate.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetParticleIntersection()
Gets the intersection of particle
p
with vector
v
, looking within a distance radius of
r
.
-
参数
-
[in]
|
p
|
The point to search for.
|
[in]
|
v
|
The vector of particle to search for.
|
[in]
|
r
|
The search distance radius.
|
[out]
|
guide
|
Assigned the guide index.
|
[out]
|
segment
|
Assigned the segment index.
|
[out]
|
segt
|
Assigned the segment t coordinate.
|
[out]
|
rayt
|
Assigned the ray coordinate.
|
-
返回
-
true
if successful, otherwise
false
.
Member Data Documentation
◆
m_pData
HairColliderData* m_pData
|
private
|