TouchVG framework
Vector2d
add
angle
angle2
angledVector
angleTo
angleTo2
crossProduct
distanceToVector
dotProduct
get
isCodirectionalTo
isCodirectionalTo
isDegenerate
isEqualTo
isLeftOf
isOppositeTo
isOppositeTo
isParallelTo
isParallelTo
isPerpendicularTo
isPerpendicularTo
isRightOf
isUnitVector
isZeroVector
kIdentity
kXAxis
kYAxis
length
lengthSquare
negate
normalize
operator!=
operator*
operator*
operator*
operator*
operator*
operator*=
operator*=
operator+
operator+=
operator-
operator-
operator-=
operator/
operator/
operator/=
operator==
perpVector
projectResolveVector
projectScaleToVector
resolveVector
resolveVector
scaleBy
scaleBy
scaledVector
set
set
setAngleLength
setLength
subtract
transform
unitVector
Vector2d
Vector2d
Vector2d
x
y
◆
projectResolveVector()
float Vector2d::projectResolveVector
(
const
Vector2d
&
xAxis
,
Vector2d
&
proj
,
Vector2d
&
perp
)
const
求本矢量在矢量xAxis上的投影矢量和垂直矢量
将本矢量投影到xAxis,计算投影比例, 正投影矢量 = xAxis * 投影比例,本矢量 = proj + perp
参数
[in]
xAxis
投影到的矢量
[out]
proj
正投影矢量
[out]
perp
垂直投影矢量
返回
投影比例,有正负
函数调用图:
这是这个函数的调用关系图:
通用矢量图形框架
, 版权所有 (C)
张云贵
2004-2017,BSD 开源许可证