vsTASKER 7 Tutorial
×
Menu
Index

Trinigy Sample

 
This demo needs VisionSDK from Trinigy.
 
It shows how to integrate and control animated characters from the VisionSDK library and display them using Trinigy graphic engine.
 
Open warriors database in data/samples/integrations directory.
 
Simple scenario shows several animated characters (Elf Warriors) provided by Trinigy that obey to simple rules coded into vsTASKER.
 
For the integration, BaseEnt and AnimatedEnt Classes have been defined as child of base Entity Class. In each of them, specific data and methods have been defined.
In Global code, the TrinigyAppInit function is called from the main loop defined in: vst_trinigy.cpp found in /Runtime/Trinigy.
 
For the integration, vsTASKER holds pointers to data instantiated using VisionSDK library:
 
pCharacter = (AnimatedCharacter_cl *) 
       Vision::Game.CreateEntity("AnimatedCharacter_cl", 
                                 VisVector_cl(0,0,0), 
                                 "models\\ElfWarrior.model");     
pEntity = (VisBaseEntity_cl*) pCharacter;
   
 
Logics and Knowledge are accessing directly the API of VisionSDK to control the animated entities:
 
void Ent::attack() {
  pCharacter->GetUpperBodyState()->Attack();
}
 
In the Database Settings, Compilation and Link pane, specific header files and libraries are used to compile and link the vsTASKER code including VisionSDK libraries to generate the final executable.
This demo can be recompiled from vsTASKER or/and debugged from vst_trinigy.sln found in /Runtime/Trinigy directory.