OpenClonk
StdMeshAnimation Class Reference

#include <StdMesh.h>

Collaboration diagram for StdMeshAnimation:
[legend]

Public Member Functions

 StdMeshAnimation ()=default
 
 StdMeshAnimation (const StdMeshAnimation &other)
 
 ~StdMeshAnimation ()
 
StdMeshAnimationoperator= (const StdMeshAnimation &other)
 

Public Attributes

StdCopyStrBuf Name
 
float Length
 

Friends

class StdMeshSkeleton
 
class StdMeshSkeletonLoader
 
class StdMeshInstance
 
class StdMeshInstanceAnimationNode
 

Detailed Description

Definition at line 84 of file StdMesh.h.

Constructor & Destructor Documentation

◆ StdMeshAnimation() [1/2]

StdMeshAnimation::StdMeshAnimation ( )
default

◆ StdMeshAnimation() [2/2]

StdMeshAnimation::StdMeshAnimation ( const StdMeshAnimation other)

Definition at line 336 of file StdMesh.cpp.

336  :
337  Name(other.Name), Length(other.Length), Tracks(other.Tracks.size())
338 {
339  // Note that all Tracks are already default-initialized to zero
340  for (unsigned int i = 0; i < Tracks.size(); ++i)
341  if (other.Tracks[i])
342  Tracks[i] = new StdMeshTrack(*other.Tracks[i]);
343 
344  OriginSkeleton = other.OriginSkeleton;
345 }
StdCopyStrBuf Name
Definition: StdMesh.h:97
float Length
Definition: StdMesh.h:98

◆ ~StdMeshAnimation()

StdMeshAnimation::~StdMeshAnimation ( )

Definition at line 347 of file StdMesh.cpp.

348 {
349  for (auto & Track : Tracks)
350  delete Track;
351 }

Member Function Documentation

◆ operator=()

StdMeshAnimation & StdMeshAnimation::operator= ( const StdMeshAnimation other)

Definition at line 353 of file StdMesh.cpp.

354 {
355  if (this == &other) return *this;
356 
357  Name = other.Name;
358  Length = other.Length;
359 
360  for (auto & Track : Tracks)
361  delete Track;
362 
363  Tracks.resize(other.Tracks.size());
364 
365  for (unsigned int i = 0; i < Tracks.size(); ++i)
366  if (other.Tracks[i])
367  Tracks[i] = new StdMeshTrack(*other.Tracks[i]);
368 
369  return *this;
370 }

References Length, and Name.

Friends And Related Function Documentation

◆ StdMeshInstance

friend class StdMeshInstance
friend

Definition at line 88 of file StdMesh.h.

◆ StdMeshInstanceAnimationNode

friend class StdMeshInstanceAnimationNode
friend

Definition at line 89 of file StdMesh.h.

◆ StdMeshSkeleton

friend class StdMeshSkeleton
friend

Definition at line 86 of file StdMesh.h.

◆ StdMeshSkeletonLoader

friend class StdMeshSkeletonLoader
friend

Definition at line 87 of file StdMesh.h.

Member Data Documentation

◆ Length

◆ Name


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