ROOT logo
// $Id: WSSeed.h 2088 2008-11-23 20:26:46Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

#ifndef Geom1_WSSeed_H
#define Geom1_WSSeed_H

#include <Glasses/ZNode.h>
#include <Stones/ZColor.h>
#include <Stones/TimeMakerClient.h>

class WSPoint;
class ZImage;
class TubeTvor;

class WSSeed : public ZNode, public TimeMakerClient
{
  MAC_RNR_FRIENDS(WSSeed);

private:
  void _init();

  Float_t hTexU; //! Texture coords; used during Triangulation
  Float_t hTexV; //! and for storage of TexOrig for texture animation

protected:
  virtual void on_insert(iterator it);
  virtual void on_remove(iterator it);
  virtual void on_rebuild();

  virtual void clear_list();

  WSPoint* get_first_point();

  ZTrans* init_slide(WSPoint* f);
  void ring(ZTrans& lcf, WSPoint* f, Double_t t);

  Int_t		mTLevel;	// X{GST}  7 Value(-range=>[2,1000,1,1],-join=>1)
  Int_t		mPLevel;	// X{GST}  7 Value(-range=>[2,1000,1,1])

  Float_t	mTexUOffset;	// X{GS}   7 Value(-range=>[-1e6,1e6,1,1000], -join=>1)
  Float_t	mTexVOffset;	// X{GS}   7 Value(-range=>[-1e6,1e6,1,1000])
  Float_t	mTexUScale;	// X{GS}   7 Value(-range=>[-1e3,1e3,1,1000], -join=>1)
  Float_t	mTexVScale;	// X{GS}   7 Value(-range=>[-1e3,1e3,1,1000])

  Float_t       mTrueLength;    // X{GST}  7 ValOut(-range=>[0,1000,1,100], -join=>1)
  Bool_t	bRenormLen;	// X{GST}  7 Bool(-join=>1)
  Float_t	mLength;	// X{GST}  7 Value(-range=>[0,1000,1,100])

  ZColor	mColor;		// X{PGST} 7 ColorButt(-join=>1)
  Float_t	mLineW;		// X{GST}  7 Value(-range=>[0,128,1,100],-join=>1)
  Bool_t	bFat;		// X{GST}  7 Bool()

  ZLink<ZImage>	mTexture;	// X{gS} L{} RnrBits{4,0,5,0, 0,0,0,0}

  // Texture animation
  //------------------
  Float_t	mDtexU;		// X{GS} 7 Value(-range=>[-100,100,1,1000], -join=>1)
  Float_t	mDtexV;		// X{GS} 7 Value(-range=>[-100,100,1,1000])

  TubeTvor*	pTuber;		//!
  Bool_t	bTextured;	//!
  WSPoint*      m_first_point;	//!
  WSPoint*      m_last_point;	//!
  Int_t         m_num_points;   //!

  // Animation control
  //------------------
  Bool_t        bAnimRunning;   // X{GS} 7 BoolOut(-join=>1)
  UInt_t        mAnimSleepMS;   // X{GS} 7 Value(-range=>[0,100000,1])
  Float_t       mAnimTime;      // X{GS} 7 Value(-range=>[-1e6,1e6,1,1000], -join=>1)
  Float_t       mAnimStepFac;   // X{GS} 7 Value(-range=>[-1e6,1e6,1,1000])
  UInt_t        m_anim_tick;    //! Inner variable for overflow checks.
public:
  void StartAnimation();        // X{ED} 7 MButt(-join=>1)
  void StopAnimation();         // X{E}  7 MButt()


public:
  WSSeed(const Text_t* n="WSSeed", const Text_t* t=0) :
    ZNode(n,t) { _init(); }
  virtual ~WSSeed();

  // virtuals
  virtual void Triangulate();

  Float_t Length();
  Float_t MeasureLength();
  void    MeasureAndSetLength(); // X{E} 7 MButt();

  void TransAtTime(ZTrans& lcf, Double_t time,
		   Bool_t repeat_p=false, Bool_t reinit_trans_p=false);

  // TimeMakerClient
  virtual void TimeTick(Double_t t, Double_t dt);

  // Toys
  void MakeLissajou(Double_t t_min, Double_t t_max, Int_t n_points,
		    Double_t ax, Double_t wx, Double_t dx,
		    Double_t ay, Double_t wy, Double_t dy,
		    Double_t az, Double_t wz, Double_t dz,
		    Float_t def_width=0.1);     // X{E} 7 MCWButt()
  void MakeFromFormulas(Double_t t_min, Double_t t_max, Int_t n_points,
			TString fx="cos(x)",
			TString fy="sin(x)",
			TString fz="x",
			Float_t def_width=0.1); // X{E} 7 MCWButt()

#include "WSSeed.h7"
  ClassDef(WSSeed, 1);
}; // endclass WSSeed


#endif
 WSSeed.h:1
 WSSeed.h:2
 WSSeed.h:3
 WSSeed.h:4
 WSSeed.h:5
 WSSeed.h:6
 WSSeed.h:7
 WSSeed.h:8
 WSSeed.h:9
 WSSeed.h:10
 WSSeed.h:11
 WSSeed.h:12
 WSSeed.h:13
 WSSeed.h:14
 WSSeed.h:15
 WSSeed.h:16
 WSSeed.h:17
 WSSeed.h:18
 WSSeed.h:19
 WSSeed.h:20
 WSSeed.h:21
 WSSeed.h:22
 WSSeed.h:23
 WSSeed.h:24
 WSSeed.h:25
 WSSeed.h:26
 WSSeed.h:27
 WSSeed.h:28
 WSSeed.h:29
 WSSeed.h:30
 WSSeed.h:31
 WSSeed.h:32
 WSSeed.h:33
 WSSeed.h:34
 WSSeed.h:35
 WSSeed.h:36
 WSSeed.h:37
 WSSeed.h:38
 WSSeed.h:39
 WSSeed.h:40
 WSSeed.h:41
 WSSeed.h:42
 WSSeed.h:43
 WSSeed.h:44
 WSSeed.h:45
 WSSeed.h:46
 WSSeed.h:47
 WSSeed.h:48
 WSSeed.h:49
 WSSeed.h:50
 WSSeed.h:51
 WSSeed.h:52
 WSSeed.h:53
 WSSeed.h:54
 WSSeed.h:55
 WSSeed.h:56
 WSSeed.h:57
 WSSeed.h:58
 WSSeed.h:59
 WSSeed.h:60
 WSSeed.h:61
 WSSeed.h:62
 WSSeed.h:63
 WSSeed.h:64
 WSSeed.h:65
 WSSeed.h:66
 WSSeed.h:67
 WSSeed.h:68
 WSSeed.h:69
 WSSeed.h:70
 WSSeed.h:71
 WSSeed.h:72
 WSSeed.h:73
 WSSeed.h:74
 WSSeed.h:75
 WSSeed.h:76
 WSSeed.h:77
 WSSeed.h:78
 WSSeed.h:79
 WSSeed.h:80
 WSSeed.h:81
 WSSeed.h:82
 WSSeed.h:83
 WSSeed.h:84
 WSSeed.h:85
 WSSeed.h:86
 WSSeed.h:87
 WSSeed.h:88
 WSSeed.h:89
 WSSeed.h:90
 WSSeed.h:91
 WSSeed.h:92
 WSSeed.h:93
 WSSeed.h:94
 WSSeed.h:95
 WSSeed.h:96
 WSSeed.h:97
 WSSeed.h:98
 WSSeed.h:99
 WSSeed.h:100
 WSSeed.h:101
 WSSeed.h:102
 WSSeed.h:103
 WSSeed.h:104
 WSSeed.h:105
 WSSeed.h:106
 WSSeed.h:107
 WSSeed.h:108
 WSSeed.h:109
 WSSeed.h:110
 WSSeed.h:111
 WSSeed.h:112
 WSSeed.h:113
 WSSeed.h:114
 WSSeed.h:115
 WSSeed.h:116