AABB
AlignmentBehavior
ArriveBehavior
AStar
BFS
BoundingSphere
BVH
BVHNode
Cell
CellSpacePartitioning
CohesionBehavior
CompositeGoal
ConvexHull
Corridor
CostTable
DFS
Dijkstra
Edge
EntityManager
EvadeBehavior
EventDispatcher
Behavior
FollowPathBehavior
FuzzyAND
FuzzyCompositeTerm
FuzzyFAIRLY
FuzzyModule
FuzzyOR
FuzzyRule
FuzzySet
FuzzyTerm
FuzzyVariable
FuzzyVERY
GameEntity
Goal
GoalEvaluator
Graph
GraphUtils
HalfEdge
HeuristicPolicyDijkstra
HeuristicPolicyEuclid
HeuristicPolicyEuclidSquared
HeuristicPolicyManhattan
InterposeBehavior
LeftSCurveFuzzySet
LeftShoulderFuzzySet
LineSegment
Logger
MathUtils
Matrix3
Matrix4
MemoryRecord
MemorySystem
MeshGeometry
MessageDispatcher
MovingEntity
NavEdge
NavMesh
NavMeshLoader
NavNode
Node
NormalDistFuzzySet
OBB
ObstacleAvoidanceBehavior
OffsetPursuitBehavior
OnPathBehavior
Path
Plane
Polygon
Polyhedron
PriorityQueue
PursuitBehavior
Quaternion
Ray
RectangleTriggerRegion
Regular
RightSCurveFuzzySet
RightShoulderFuzzySet
SAT
SeekBehavior
SeparationBehavior
SingletonFuzzySet
Smoother
SphericalTriggerRegion
State
StateMachine
SteeringBehavior
SteeringManager
Task
TaskQueue
Telegram
Think
Time
TriangularFuzzySet
Trigger
TriggerRegion
Vector3
Vehicle
Version
WanderBehavior

updateDegreeOfMembership

概述

updateDegreeOfMembership 函数用于更新以右肩形状表示的模糊集合的隶属度。

语法

rightShoulderFuzzySet.updateDegreeOfMembership(value)

参数

  • value: 表示当前输入值的数字。

返回值

该函数没有返回值,会直接修改实例中的 degreeOfMembership 属性。

示例

const myFuzzySet = new Yuka.RightShoulderFuzzySet(0, 15, 30);
myFuzzySet.updateDegreeOfMembership(10);
console.log(myFuzzySet.degreeOfMembership);
// 输出: 0.5

实现细节

以给定的右肩形状,根据三角模糊数学法则计算新的隶属度,并修改实例中的 degreeOfMembership 属性。如果输入值小于当前模糊集合的左肩位置,则该函数不会修改隶属度。