Creature Control for Unity v0.1
Loading...
Searching...
No Matches
Creatures.Leg Class Reference

Description

A leg of a creature.

Unity Properties

Inheritance diagram for Creatures.Leg:
Creatures.Bone

Public Member Functions

override void DetectFeatures ()
 Try to determine the leg bones.
virtual Quaternion GetStdOrientation ()
 Get the standardized orientation for a bone.
virtual void RemoveFeatures ()
 Remove features from this bone.

Static Public Member Functions

static BoneType SetBone< BoneType > (Creature creature, Transform transform)
 Set a Bone component to the give transform.
static void UnsetBone< BoneType > (Transform transform)
 Remove a bone from the given transform.

Public Attributes

Side side
 The Side of of body where this leg is located.
Leg otherLeg
 The leg on the other Side of the body.
Creature creature
 The creature to which the bone belongs.

Static Public Attributes

static readonly string nameOfFemur = nameof(_femur)
 The name of the (private) _femur property.
static readonly string nameOfTibia = nameof(_tibia)
 The name of the (private) _tibia property.
static readonly string nameOfTarsus = nameof(_tarsus)
 The name of the (private) _tarsus property.
static readonly string nameOfPhalanges = nameof(_phalanges)
 The name of the (private) _phalanges property.

Protected Member Functions

virtual void Initialize (Creature creature)
 Initiliaze the bone.

Properties

Transform coxa [get, set]
 The hip bone.
Transform femur [get, set]
 The upper leg or thigh bone.
Transform tibia [get, set]
 The lower leg or shank bone.
Transform tarsus [get, set]
 The foot bone.
Transform phalanges [get, set]
 The toes.
Transform end [get, set]
 The end of the leg.
float femurLength [get]
 The length of the femur bone.
float tibiaLength [get]
 The length of the tibia bone.
float tarsusLength [get]
 The length of the tarsus bone.
float phalangesLength [get]
 The length of the phalanges.
float length [get]
 The length of the leg from hip to foot.
float footLength [get]
 The size of the foot.
bool isConfigured [get]
 Check if all bones of the legs have been configured.
bool isLeft [get]
 Is this leg at the left Side?
bool isRight [get]
 Is this leg at the right Side?
Vector3 kneeAxis [get]
 The rotation axis of the knee joint.

Member Function Documentation

◆ DetectFeatures()

override void Creatures.Leg.DetectFeatures ( )
virtual

Try to determine the leg bones.

Reimplemented from Creatures.Bone.

◆ SetBone< BoneType >()

BoneType Creatures.Bone.SetBone< BoneType > ( Creature creature,
Transform transform )
staticinherited

Set a Bone component to the give transform.

Template Parameters
BoneTypeThe type of bone
Parameters
creatureThe creature to which the bone belongs
transformThe transform to assign the bone to
Returns
The newly created bone
Type Constraints
BoneType :Bone 

◆ UnsetBone< BoneType >()

void Creatures.Bone.UnsetBone< BoneType > ( Transform transform)
staticinherited

Remove a bone from the given transform.

Template Parameters
BoneTypeThe bone type to remove
Parameters
transformThe Transform to remove it from
Type Constraints
BoneType :Bone 

◆ Initialize()

virtual void Creatures.Bone.Initialize ( Creature creature)
protectedvirtualinherited

Initiliaze the bone.

Parameters
creatureThe creature to which the bone belongs

◆ GetStdOrientation()

virtual Quaternion Creatures.Bone.GetStdOrientation ( )
virtualinherited

Get the standardized orientation for a bone.

Returns

This orientation is independent from the orientation of the bone in the model The orientation matches the oriention in the target rig

Reimplemented in Creatures.Head, Creatures.Insects.Antenna, and Creatures.Tail.

◆ RemoveFeatures()

virtual void Creatures.Bone.RemoveFeatures ( )
virtualinherited

Remove features from this bone.

This can be child bones or specific properties for this bone

Reimplemented in Creatures.Insects.Head.

Member Data Documentation

◆ nameOfFemur

readonly string Creatures.Leg.nameOfFemur = nameof(_femur)
static

The name of the (private) _femur property.

This is only needed for the Unity UI Use femur for all other purposes

◆ nameOfTibia

readonly string Creatures.Leg.nameOfTibia = nameof(_tibia)
static

The name of the (private) _tibia property.

This is only needed for the Unity UI Use tibia for all other purposes

◆ nameOfTarsus

readonly string Creatures.Leg.nameOfTarsus = nameof(_tarsus)
static

The name of the (private) _tarsus property.

This is only needed for the Unity UI Use tarsus for all other purposes

◆ nameOfPhalanges

readonly string Creatures.Leg.nameOfPhalanges = nameof(_phalanges)
static

The name of the (private) _phalanges property.

This is only needed for the Unity UI Use phalanges for all other purposes

Property Documentation

◆ length

float Creatures.Leg.length
get

The length of the leg from hip to foot.

This consists of the femur and tibia

◆ footLength

float Creatures.Leg.footLength
get

The size of the foot.

This consists of the tarsus and phalanges

◆ isConfigured

bool Creatures.Leg.isConfigured
get

Check if all bones of the legs have been configured.

Returns
True when all bones are configured

◆ kneeAxis

Vector3 Creatures.Leg.kneeAxis
get

The rotation axis of the knee joint.

This is in femur local space.


The documentation for this class was generated from the following file: