예제 #1
0
MeshData::MeshData(){

bIsSkeletal=false;
bIsHead=false;
bVertexColor=true;
bEditable=true;

bUnsavedChanges= false;

boneCount=0;
texCoordPerVertexCount=3;
verticesPerShapeCount=4;

meshType=MESH_VBO;
vertexInterpretation=GL_POINTS;
bindShapeMatrix=NULL;

lowerLeftBack=Vector3f(0,0,0);
upperRightFront=Vector3f(0,0,0);
center=Vector3f(0,0,0);
registerProperties();

sceneData=SceneData::getInstance();
renderer=Renderer::getInstance();
}
MorphSpriteMeshNode::MorphSpriteMeshNode(){

name = "morph";
color= Vector4f(0.4, 0.0, 0.0, 1.0);
morphOne=NULL;
morphTwo=NULL;

particleScaleOne=0.0;
particleScaleTwo=0.0;

particleAngleScaleOne=0.0;
particleAngleScaleTwo=0.0;

morphRate= 0.001;
morphAngleRate= 0.0001;

listType.push_back("15PickWorldButton");
listName.push_back("morphOne");
listProp.push_back("MORPHONE");

listType.push_back("15PickWorldButton");
listName.push_back("morphTwo");
listProp.push_back("MORPHTWO");

listType.push_back("15TextInputButton");
listName.push_back("morphRate");
listProp.push_back("MORPHRATE");

listType.push_back("15TextInputButton");
listName.push_back("morphAngleRate");
listProp.push_back("MORPHANGLERATE");

registerProperties();
}
SwitchCameraNode::SwitchCameraNode(){

    name="SwitchCam";
    cameraActor=NULL;
    focus=15.0;
    oldTool=TOOL_SELECT;
    bCameraShake=false;

    listType.push_back("15PickWorldButton");
    listName.push_back("cameraActor");
    listProp.push_back("CAMERAACTOR");
    listIcon.push_back("icon_flat");

    listType.push_back("15TextInputButton");
    listName.push_back("focus");
    listProp.push_back("FOCUS");
    listIcon.push_back("icon_flat");

    listType.push_back("15TextInputButton");
    listName.push_back("cameraShake");
    listProp.push_back("BCAMERASHAKE");
    listIcon.push_back("icon_flat");

    color=Vector4f(0.5,0.5,0.5,1.0);
    registerProperties();
    controller=sceneData->controller;
}
예제 #4
0
PhysicsActor::PhysicsActor(){

name="PhysicsActor";
drawType=DRAW_CUBE;

world=renderer->physicsWorld;
space=renderer->collisionSpace;

body = dBodyCreate(renderer->physicsWorld);
geom=0;
joint=NULL;
oldBase=NULL;

shape=Vector3f(0.1,0.3,0.1);
mass=1.0;
type=CAPSULESHAPE;
//drawType=DRAW_SPECIAL;
bJointedToBase=false;
bSkeletalPart=false;
bFixToWorld=false;
bInit=false;

angleDamp=0.59;
linearDamp=0.004;

registerProperties();



menuType.push_back("12AssignButton");
menuProp.push_back("NULL");
menuIcon.push_back("icon_base");
menuName.push_back("make joint");
}
예제 #5
0
	PhysicsSystemImpl(Engine& engine)
		: m_allocator(engine.getAllocator())
		, m_engine(engine)
		, m_manager(*this, engine.getAllocator())
	{
		m_manager.create(ResourceManager::PHYSICS, engine.getResourceManager());
		registerProperties();
	}
LoadDrawSkeletonButton::LoadDrawSkeletonButton(){

listWidth=200;
listColor=Vector4f(0.8,0.8,0.8,1.0);
listShader="buttonColor";

registerProperties();
}
예제 #7
0
	explicit AudioSystemImpl(Engine& engine)
		: m_engine(engine)
		, m_manager(engine.getAllocator())
		, m_device(nullptr)
	{
		registerProperties(engine.getAllocator());
		AudioScene::registerLuaAPI(m_engine.getState());
	}
예제 #8
0
		explicit PhysicsSystemImpl(Engine& engine)
			: m_allocator(engine.getAllocator())
			, m_engine(engine)
			, m_manager(*this, engine.getAllocator())
		{
			registerProperties(engine.getAllocator());
			m_manager.create(PHYSICS_HASH, engine.getResourceManager());
			PhysicsScene::registerLuaAPI(m_engine.getState());
		}
BrushInspector::BrushInspector(){

level=0;
currentSwatch=0;
numSwatches=5;

brushViz=0;

registerProperties();
}
예제 #10
0
	explicit AudioSystemImpl(Engine& engine)
		: m_engine(engine)
		, m_manager(engine.getAllocator())
		, m_device(nullptr)
	{
		registerProperties(engine.getAllocator());
		AudioScene::registerLuaAPI(m_engine.getState());
		m_device = AudioDevice::create(m_engine);
		m_manager.create(CLIP_TYPE, m_engine.getResourceManager());
	}
예제 #11
0
LoadNode::LoadNode(){

fileName="NULL";
registerProperties();

    listType.push_back("15TextInputButton");
    listName.push_back("filename");
    listProp.push_back("FILENAME");
    listIcon.push_back("icon_flat");

}
VideoTextureActor::VideoTextureActor(){

    videoInfo="video.xml";
    bPlaying = false;
    playSpeed=1.0f;
    sceneShaderID="texture";
    setTextureID("videoTexture");
    drawType = DRAW_PLANE;
    bTextured= true;
    registerProperties();

}
예제 #13
0
StopAnimNode::StopAnimNode(){

    color=Vector4f(0.1,0.1,0.4,1.0);
    name="stopAnim";
    applyTo=NULL;

    listType.push_back("15PickWorldButton");
    listName.push_back("apply To");
    listProp.push_back("APPLYTO");
    listIcon.push_back("icon_flat");

    registerProperties();
}
WaitForEventNode::WaitForEventNode(){

    color=Vector4f(0.5,0.3,0.5,1);
    name="WaitForEvent";
    eventName="NULL";

    listType.push_back("15TextInputButton");
    listName.push_back("eventName");
    listProp.push_back("EVENTNAME");
    listIcon.push_back("icon_flat");

    registerProperties();
}
예제 #15
0
KeyInputNode::KeyInputNode(){
    name="KeyInputRoot";
    keyInput=" ";
    bKeyInputBranch=true;
    treeStart=this;
    listType.push_back("15TextInputButton");
    listProp.push_back("KEYINPUT");
    listIcon.push_back("icon_flat");


    buttonColor=Vector4f(0.5,1.0,0.5,1.0);
    mouseOverColor=Vector4f(0.7,1.0,0.7,1.0);

    registerProperties();
}
예제 #16
0
AssetInspector::AssetInspector(){

    name="assetInspector";
    tooltip="Asset Inspector";
    listColumns=4;
    level=0;
    scrollSize=250.0;
    listDisplaySize=500;
    textureID="icon_props";
    listOffsetY=64;
    bKinectToolOpen=false;
    bShowUntitled=false;
    bDrawName=false;
    registerProperties();
}
InterfaceConfig::InterfaceConfig(const char *prop_prefix,
                    const struct in_addr *ip,
                    const struct in_addr *nm, const struct in_addr *gw,
                    const struct in_addr *dns1, const struct in_addr *dns2,
                    const struct in_addr *dns3) {
    mPropPrefix = strdup(prop_prefix);
    mUseDhcp = false;

    memcpy(&mIp, ip, sizeof(struct in_addr));
    memcpy(&mNetmask, nm, sizeof(struct in_addr));
    memcpy(&mGateway, gw, sizeof(struct in_addr));
    memcpy(&mDns1, dns1, sizeof(struct in_addr));
    memcpy(&mDns2, dns2, sizeof(struct in_addr));
    memcpy(&mDns3, dns3, sizeof(struct in_addr));
    registerProperties();
}
예제 #18
0
LineSegmentPlot::LineSegmentPlot(QQuickItem *parent)
    : LinePlot(parent)
    , m_dataSize(0)
{
    QMap<QString, QString> props;
    props["startX"] = "xData";
    props["startY"] = "yData";
    props["endX"] = "endX";
    props["endY"] = "endY";
    registerProperties(props);

//    connect(this, &LineSegmentPlot::startXChanged, this, &LineSegmentPlot::updateData);
//    connect(this, &LineSegmentPlot::startYChanged, this, &LineSegmentPlot::updateData);
//    connect(this, &LineSegmentPlot::endXChanged, this, &LineSegmentPlot::updateData);
//    connect(this, &LineSegmentPlot::endYChanged, this, &LineSegmentPlot::updateData);
}
예제 #19
0
Input::Input(){

    lastKey=0;

    mouseX=0,
    mouseY=0,

    startPressLeftBtn=0,
    startPressRightBtn=0,

    bWarpMouse=false;


    pressedLeft=false,
    pressedRight=false,
    pressedMiddle=false,
    bShiftDown=false,
    bCtrlDown=false,
    bAltDown=false,
    bModifierPressed=false,
    bTextInput=false,
    bKeepSelection=false;
    bPressedMovementKeys=false;
    bConfineMouse=false;
    inputText="";
    tooltip="";
    //eventTrigger="NULL";

    keyVector=Vector3f(0,0,0),          //delta!!!!
    mouseVector=Vector3f(0,0,0),        //delta!!!!
    mouse3D=Vector3f(0,0,0);            //mouse position in 3D coordinates (uses picking)


    focusButton=NULL;     //the button that gets all our attention
    dragButton=NULL;       // the button we're currently dragging with us
    hudTarget=NULL;       // the button we're currently hovering on

    worldTarget=NULL;

    upDown=NULL;
    leftRight=NULL;

    registerProperties();
}
예제 #20
0
RayCloudPlot::RayCloudPlot(QQuickItem *parent)
    : Plot3DBase(parent)
    , m_start(NDArrayTyped<float>({0}))
    , m_end(NDArrayTyped<float>({0}))
    , m_raycloud(new RayCloud())
    , m_linewidthParam(new QParameter("linewidth", 10.0f))
    , m_pixelSize(new QParameter("pixelSize", QVector2D(1.0, 1.0)))
{
    QMap<QString,QString> props;
    props.insert("start", "start");
    props.insert("end", "end");
    registerProperties(props);

//    entity()->addComponent(m_raycloud);
    entity()->addComponent(makeMaterial());

    connect(this, &QQuickItem::widthChanged, this, &RayCloudPlot::updatePixelSize);
    connect(this, &QQuickItem::heightChanged, this, &RayCloudPlot::updatePixelSize);
    updatePixelSize();
}
InterfaceConfig::InterfaceConfig(const char *prop_prefix,
                    const char *ip, const char *nm,
                    const char *gw, const char *dns1, const char *dns2,
                    const char *dns3) {
    mPropPrefix = strdup(prop_prefix);
    mUseDhcp = false;

    if (!inet_aton(ip, &mIp))
        LOGW("Unable to parse ip (%s)", ip);
    if (!inet_aton(nm, &mNetmask))
        LOGW("Unable to parse netmask (%s)", nm);
    if (!inet_aton(gw, &mGateway))
        LOGW("Unable to parse gateway (%s)", gw);
    if (!inet_aton(dns1, &mDns1))
        LOGW("Unable to parse dns1 (%s)", dns1);
    if (!inet_aton(dns2, &mDns2))
        LOGW("Unable to parse dns2 (%s)", dns2);
    if (!inet_aton(dns3, &mDns3))
        LOGW("Unable to parse dns3 (%s)", dns3);
    registerProperties();
}
예제 #22
0
파일: testApp.cpp 프로젝트: fiezi/hfsTools
void testApp::msbSetup(){

    renderer=Renderer::getInstance();
    input=Input::getInstance();

    renderer->loadPreferences();

    renderer->windowX=SCREENRESX;
    renderer->windowY=SCREENRESY;

    renderer->screenX=SCREENRESX;
    renderer->screenY=SCREENRESY;

    renderer->setup();

    renderer->camActor=new Actor;
    renderer->camActor->setLocation(Vector3f(0,0,-5));
    renderer->camActor->postLoad();

    registerProperties();
}
예제 #23
0
Inspector::Inspector(){

    bOpen=false;
    bToggleInspector=true;
    bPermanent=true;
    initialLocation=location;
    tabWidth=350;
    tabHeight=0;
    listHeight=64;
    listWidth=48;
    listDisplayMode=4;
    listColumns=1;
    level=0;

    textureID="icon_ball";

    backgroundButton=NULL;

    listOffsetY=32;

    registerProperties();
}
예제 #24
0
BoneActor::BoneActor(){

name="Bone";
drawType=DRAW_CUBE;
scale=Vector3f(1, 1, 1);
mySystem=NULL;
influence=10;

bComputeLight=false;
bZTest=true;
bZWrite=true;

bPhysicsBone=false;
bJointedToBase=true;
bFixToWorld=false;

bDoIK=false;


sideRotation = 0.0;
f=0.0;

registerProperties();
}
예제 #25
0
파일: tool.cpp 프로젝트: jgrande/ginga
int Tool::execute( int argc, char *argv[] ) {
	int exitCode=-1;
	cfg::cmd::CommandLine cmd( argc, argv );

#ifndef NDEBUG
	try {
#endif

		//	Create tree config
		registerProperties( cmd );

		//	Calls the callbacks that initializes the tool's libraries
		util::reg::init();

		//	Register the configuration files that will be loaded
		registerConfigs();

		//	Load configuration from files
		loadConfig();

		//	Parse commandline
		exitCode = cmd.parse() ? execute( cmd ) : -1;

		//	Calls the callbacks that finalizes the tool's libraries
		util::reg::fin();

#ifndef NDEBUG
	} catch (const std::exception &e) {
		printf( "[Tool] Catch exception: %s\n", e.what() );
	} catch (...) {
		printf( "[Tool] Catch unkown exception\n" );
	}
#endif

	return exitCode;
}
InterfaceConfig::InterfaceConfig(const char *prop_prefix) {
    mPropPrefix = strdup(prop_prefix);
    mUseDhcp = true;
    registerProperties();
}
예제 #27
0
파일: xim.c 프로젝트: t3swing/fcitx-clone
Bool MySetFocusHandler (IMChangeFocusStruct * call_data)
{
    CurrentIC = (IC *) FindIC (call_data->icid);
    connect_id = call_data->connect_id;

    if (ConnectIDGetState (connect_id) != IS_CLOSED) {
        if (icidGetIMState(call_data->icid) == IS_CLOSED)
            IMPreeditStart (ims, (XPointer) call_data);

        EnterChineseMode (lastConnectID == connect_id);

        if (!bUseDBus)
            DrawMainWindow ();

        if (ConnectIDGetState (connect_id) == IS_CHN) {
            if (bVK)
                DisplayVKWindow ();
        }
        else {
            XUnmapWindow (dpy, inputWindow);
            if (!bUseDBus)
                XUnmapWindow (dpy, VKWindow);
        }
    }
    else {
        if (icidGetIMState(call_data->icid) != IS_CLOSED)
            IMPreeditEnd (ims, (XPointer) call_data);

        CloseInputWindow();
        if (!bUseDBus) {
            XUnmapWindow (dpy, VKWindow);

#ifdef _ENABLE_TRAY
            DrawTrayWindow (INACTIVE_ICON, 0, 0, TRAY_ICON_HEIGHT, TRAY_ICON_WIDTH );
#endif
            if (hideMainWindow == HM_SHOW) {
                DisplayMainWindow ();
                DrawMainWindow ();
            }
            else
                XUnmapWindow (dpy, mainWindow);
        }
#ifdef _ENABLE_DBUS
        else
            updatePropertyByConnectID(connect_id);
#endif

        icidSetIMState(call_data->icid, ConnectIDGetState (connect_id));
        lastConnectID = connect_id;
        //When application gets the focus, re-record the time.
        bStartRecordType = False;
        iHZInputed = 0;

        if (ConnectIDGetTrackCursor (connect_id) && bTrackCursor) {
            position * pos = ConnectIDGetPos(connect_id);

            if (pos) {
                iClientCursorX = pos->x;
                iClientCursorY = pos->y;
                if (!bUseDBus)
                    XMoveWindow (dpy, inputWindow, iClientCursorX, iClientCursorY);
#ifdef _ENABLE_DBUS
                else
                    KIMUpdateSpotLocation(iClientCursorX, iClientCursorY);
#endif
            }
        }

#ifdef _ENABLE_DBUS
        if (bUseDBus)
            registerProperties();
#endif
    }

    return True;
}
예제 #28
0
//--------------------------------------------------------------
void testApp::setup(){


    registerProperties();

    oscPath="/pilot/float";

    channel=1;
    bSending=false;

    //MSB setup
    renderer=Renderer::getInstance();
    input=Input::getInstance();

    renderer->loadPreferences();

    renderer->setup();

    TextInputButton* txBtn;

    txBtn=new TextInputButton;
    txBtn->location.x= 10;
    txBtn->location.y= 300;
    txBtn->scale.x=100;
    txBtn->color=Vector4f(0.6,0.6,0.6,1.0);
    txBtn->name="Channel:";
    txBtn->bDrawName=true;
    txBtn->buttonProperty="CHANNEL";
    txBtn->parent=this;
    txBtn->textureID="icon_flat";
    txBtn->setup();
    renderer->buttonList.push_back(txBtn);


    txBtn=new TextInputButton;
    txBtn->location.x= 10;
    txBtn->location.y= 340;
    txBtn->scale.x=100;
    txBtn->color=Vector4f(0.6,0.6,0.6,1.0);
    txBtn->name="OSCpath:";
    txBtn->bDrawName=true;
    txBtn->buttonProperty="OSCPATH";
    txBtn->parent=this;
    txBtn->textureID="icon_flat";
    txBtn->setup();
    renderer->buttonList.push_back(txBtn);

    AssignButton* aBtn;
    aBtn=new AssignButton;
    aBtn->location.x= 10;
    aBtn->location.y= 380;
    aBtn->scale.x=100;
    aBtn->color=Vector4f(0.6,0.6,0.6,1.0);
    aBtn->name="start sending";
    aBtn->bDrawName=true;
    aBtn->parent=this;
    aBtn->textureID="icon_flat";
    aBtn->setup();
    renderer->buttonList.push_back(aBtn);

    //start sending right away!
    trigger(aBtn);

	ofBackground(255,255,255);

	// 0 output channels,
	// 2 input channels
	// 22050 samples per second
	// 256 samples per buffer
	// 4 num buffers (latency)

	left = new float[256];

	bufferCounter = 0;
	drawCounter = 0;

    ofSoundStreamListDevices();
	ofSoundStreamSetup(0,1,this, 22050, 256, 4);

}
예제 #29
0
int ToolExtension::execute( int argc, char *argv[] ) {
    util::cfg::cmd::CommandLine cmd( argc, argv );
    registerProperties( cmd );
    return 1;
}
CreatePrefabButton::CreatePrefabButton(){

bMessageWindow=true;
registerProperties();
}