Magnetoculus
Visualisation de champs en VR avec Oculus
Generator Class Referenceabstract
Inheritance diagram for Generator:
FieldGenerator GenericTownGenerator IsoSurfaceGenerator SurfaceGenerator VoxelGenerator

Public Member Functions

delegate void GenerationEventWithArgs (float generationProgress, string generationText)
 
delegate void GenerationEvent ()
 
delegate void ErrorEvent (string message)
 
void StartGeneration ()
 

Protected Member Functions

abstract void CreateRepresentationInformation ()
 
abstract IEnumerator AsynchronousGeneration ()
 
void FileError (string message)
 
void TriggerGenerationProgressEvent (float generationProgress, string generationText)
 
void TriggerGenerationStartEvent ()
 
void TriggerGenerationEndEvent ()
 
void TriggerGenerationErrorEvent (string message)
 

Protected Attributes

GameObject m_ChunkPrefab
 
RepresentationNavigation m_RepresentationManagerPanel
 
FileInfoManager m_FileInfoManager
 
string m_FileName
 
GameObject m_Representation
 
Mesh m_Mesh
 

Events

static GenerationEvent GenerationStartEvent
 
static GenerationEventWithArgs GenerationProgressEvent
 
static GenerationEvent GenerationEndEvent
 
static ErrorEvent GenerationErrorEvent
 

Detailed Description

Abstract super class for field and town generation. It can :

  • read the file
  • start the generation
  • manage the progress bar

Member Function Documentation

◆ AsynchronousGeneration()

abstract IEnumerator Generator.AsynchronousGeneration ( )
protectedpure virtual

The generation is a coroutine so we can check its state and display it on a progress bar.

Implemented in GenericTownGenerator, IsoSurfaceGenerator, VoxelGenerator, and SurfaceGenerator.

◆ CreateRepresentationInformation()

abstract void Generator.CreateRepresentationInformation ( )
protectedpure virtual

◆ ErrorEvent()

delegate void Generator.ErrorEvent ( string  message)

◆ FileError()

void Generator.FileError ( string  message)
protected
Parameters
messagethe error message to display.

Should be called if any error is detected in the file in order to stop the generation and warn the user. It sends a GenerationEndEvent and a GenerationErrorEvent.

◆ GenerationEvent()

delegate void Generator.GenerationEvent ( )

◆ GenerationEventWithArgs()

delegate void Generator.GenerationEventWithArgs ( float  generationProgress,
string  generationText 
)

◆ StartGeneration()

void Generator.StartGeneration ( )

Start the generation routine and send a GenerationStartEvent.

◆ TriggerGenerationEndEvent()

void Generator.TriggerGenerationEndEvent ( )
protected

◆ TriggerGenerationErrorEvent()

void Generator.TriggerGenerationErrorEvent ( string  message)
protected

◆ TriggerGenerationProgressEvent()

void Generator.TriggerGenerationProgressEvent ( float  generationProgress,
string  generationText 
)
protected

◆ TriggerGenerationStartEvent()

void Generator.TriggerGenerationStartEvent ( )
protected

Member Data Documentation

◆ m_ChunkPrefab

GameObject Generator.m_ChunkPrefab
protected

The prefab used to create a proper mesh.

◆ m_FileInfoManager

FileInfoManager Generator.m_FileInfoManager
protected

The FileInfoManager store all the relevant data about the file and the options chosen by the user.

◆ m_FileName

string Generator.m_FileName
protected

The full path of the file used for the generation.

◆ m_Mesh

Mesh Generator.m_Mesh
protected

The mesh where the computed vertices/triangles/colors will be added

◆ m_Representation

GameObject Generator.m_Representation
protected

Every generation creates a representation object so the user can enable/disable/delete it.

◆ m_RepresentationManagerPanel

RepresentationNavigation Generator.m_RepresentationManagerPanel
protected

The representationInformation should belong to this parent.

Event Documentation

◆ GenerationEndEvent

GenerationEvent Generator.GenerationEndEvent
static

◆ GenerationErrorEvent

ErrorEvent Generator.GenerationErrorEvent
static

◆ GenerationProgressEvent

GenerationEventWithArgs Generator.GenerationProgressEvent
static

◆ GenerationStartEvent

GenerationEvent Generator.GenerationStartEvent
static

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