OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4ValueProviderCosR Class Reference

#include <C4MeshAnimation.h>

Inheritance diagram for C4ValueProviderCosR:
[legend]
Collaboration diagram for C4ValueProviderCosR:
[legend]

Public Member Functions

 C4ValueProviderCosR ()
 
 C4ValueProviderCosR (C4Object *object, C4Real begin, C4Real end, C4Real offset)
 
virtual bool Execute ()
 
virtual void CompileFunc (StdCompiler *pComp)
 
virtual void DenumeratePointers ()
 
virtual void ClearPointers (C4Object *pObj)
 

Static Public Member Functions

static const IDBaseLookup (const char *name)
 
static const IDBaseLookup (const std::type_info &type)
 

Public Attributes

C4Real Value
 

Detailed Description

Definition at line 251 of file C4MeshAnimation.h.

Constructor & Destructor Documentation

C4ValueProviderCosR::C4ValueProviderCosR ( )
inline

Definition at line 254 of file C4MeshAnimation.h.

254 : Object(nullptr), Begin(Fix0), End(Fix0), Offset(Fix0) {}
const C4Real Fix0
Definition: C4Real.h:312
C4ValueProviderCosR::C4ValueProviderCosR ( C4Object object,
C4Real  begin,
C4Real  end,
C4Real  offset 
)

Definition at line 567 of file C4MeshAnimation.cpp.

References Execute().

567  :
568  Object(object), Begin(begin), End(end), Offset(offset)
569 {
570  Execute();
571 }
virtual bool Execute()

Here is the call graph for this function:

Member Function Documentation

virtual void C4ValueProviderCosR::ClearPointers ( C4Object pObj)
inlinevirtual

Reimplemented from StdMeshInstance::SerializableValueProvider.

Definition at line 260 of file C4MeshAnimation.h.

260 { if(Object == pObj) Object = nullptr; }
void C4ValueProviderCosR::CompileFunc ( StdCompiler pComp)
virtual

Reimplemented from StdMeshInstance::SerializableValueProvider.

Definition at line 582 of file C4MeshAnimation.cpp.

References CompileFunc(), C4MenuItem::Object, StdCompiler::Separator(), and StdCompiler::Value().

583 {
585  pComp->Separator();
586  pComp->Value(Object);
587  pComp->Separator();
588  pComp->Value(Begin);
589  pComp->Separator();
590  pComp->Value(End);
591  pComp->Separator();
592  pComp->Value(Offset);
593 }
virtual bool Separator(Sep eSep=SEP_SEP)
Definition: StdCompiler.h:129
void Value(const T &rStruct)
Definition: StdCompiler.h:171
void CompileFunc(C4Real &rValue, StdCompiler *pComp)
Definition: C4Real.cpp:9033

Here is the call graph for this function:

virtual void C4ValueProviderCosR::DenumeratePointers ( )
inlinevirtual

Reimplemented from StdMeshInstance::SerializableValueProvider.

Definition at line 259 of file C4MeshAnimation.h.

References C4ObjectPtr::DenumeratePointers().

259 { Object.DenumeratePointers(); }
void DenumeratePointers()
Definition: C4ObjectPtr.cpp:46

Here is the call graph for this function:

bool C4ValueProviderCosR::Execute ( )
virtual

Implements StdMeshInstanceValueProvider.

Definition at line 573 of file C4MeshAnimation.cpp.

References Cos(), C4Object::fix_r, C4MenuItem::Object, and StdMeshInstanceValueProvider::Value.

Referenced by C4ValueProviderCosR().

574 {
575  // Object might have been removed
576  if(!Object) return false;
577 
578  Value = Begin + (End - Begin) * Cos(Object->fix_r + Offset);
579  return true;
580 }
C4Real fix_r
Definition: C4Object.h:125
C4Real Cos(const C4Real &fAngle)
Definition: C4Real.h:266

Here is the call graph for this function:

Here is the caller graph for this function:

static const IDBase* StdMeshInstance::SerializableValueProvider::Lookup ( const char *  name)
inlinestaticinherited

Definition at line 462 of file StdMesh.h.

463  {
464  if(!IDs) return nullptr;
465  for(unsigned int i = 0; i < IDs->size(); ++i)
466  if(strcmp((*IDs)[i]->name, name) == 0)
467  return (*IDs)[i];
468  return nullptr;
469  }
static const IDBase* StdMeshInstance::SerializableValueProvider::Lookup ( const std::type_info &  type)
inlinestaticinherited

Definition at line 471 of file StdMesh.h.

472  {
473  if(!IDs) return nullptr;
474  for(unsigned int i = 0; i < IDs->size(); ++i)
475  if((*IDs)[i]->type == type)
476  return (*IDs)[i];
477  return nullptr;
478  }

Member Data Documentation


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