<commit_before>// Copyright (c) 2010-2013 Turbulenz Limited
/*global TurbulenzEngine: false*/
/*global Utilities: false*/
/*global Observer: false*/

//
// Renderable
//
interface Renderable
{

    geometry: Geometry;
    geometryType: string;
    node: SceneNode;

    renderUpdate: any; // TODO?
    rendererInfo: any; // TODO?
    distance: number;
    drawParameters: DrawParameters[];
    sharedMaterial: Material;

    skinController?: ControllerBaseClass;

    center: any; // v3
    halfExtents: any; // v3 / v6?



    // Methods

    clone(): Renderable;
    isSkinned(): boolean;
    hasCustomWorldExtents(): boolean;
    addCustomWorldExtents(extents: any);
    setNode(node: SceneNode);
    destroy();
};

//
// SceneNode
//
class SceneNode
{
    static version = 1;

    static _tempDirtyNodes: SceneNode[] = [];

    name                            : string;
    dynamic                         : boolean;
    disabled                        : boolean;

    dirtyWorld                      : boolean;
    dirtyWorldExtents               : boolean;
    dirtyLocalExtents               : boolean;

    //Counter of number of times modified.
    worldUpdate                     : number;
    rendererInfo                    : any; // TODO?

    local                           : any; // m43
    world                           : any; // m43

    localExtents                    : any; //
    localExtentsCenter              : any; // v3
    localHalfExtents                : any; // v3?
    customLocalExtents              : any; //

    worldExtents                    : any; //
    worldExtentsUpdate              : boolean;
    customWorldExtents              : any; //
    numCustomRenderableWorldExtents : number;

    spatialIndex                   : number;

    camera                          : Camera;

    parent                          : SceneNode;
    notifiedParent                  : boolean;
    scene                           : Scene;
    children                        : SceneNode[];
    childNeedsUpdateCount           : number;

    clonedObserver                  : Observer;
    destroyedObserver               : Observer;

    // Lights
    lights                          : Light[];
    lightInstances                  : LightInstance[];

    // Animation
    skin                            : any; // TODO:

    // Physics
    physicsNodes                    : PhysicsNode[];
    kinematic: boolean;

    // Geometry
    geometryinstances               : { [name: string]: GeometryInstance; };

    // // During loading
    // reference: string;
    // inplace: boolean;

    renderables: Renderable[];

    // On prototype
    mathDevice: MathDevice;
    arrayConstructor: any;

    //
    //SceneNode.makePath
    //
    static makePath(parentPath, childName)
    {
        return parentPath + "/" + childName;
    }

    //
    //SceneNode.invalidSetLocalTransform
    //
    static invalidSetLocalTransform()
    {
        debug.abort("setLocalTransform can not be called on static nodes.");
    }

    //
    // SceneNode
    //
    constructor(params)
    {
        this.name = params.name;

        var md = this.mathDevice;
        if (!md)
        {
            md = TurbulenzEngine.getMathDevice();
            SceneNode.prototype.mathDevice = md;
        }

        this.dynamic = params.dynamic || false;
        this.disabled = params.disabled || false;

        this.dirtyWorldExtents = true;
        this.dirtyLocalExtents = true;
        this.worldUpdate = 0; //Counter of number of times modified.

        var local = params.local;
        if (local)
        {
            this.local = md.m43Copy(local);
        }
        else
        {
            this.local = md.m43BuildIdentity();
        }
        local = this.local;
        this.world = md.m43Copy(local);
    }

    //<commit_msg>Added declaration for frameVisible property, used by the Scene.<commit_after>// Copyright (c) 2010-2013 Turbulenz Limited
/*global TurbulenzEngine: false*/
/*global Utilities: false*/
/*global Observer: false*/

//
// Renderable
//
interface Renderable
{

    geometry: Geometry;
    geometryType: string;
    node: SceneNode;

    renderUpdate: any; // TODO?
    rendererInfo: any; // TODO?
    distance: number;
    drawParameters: DrawParameters[];
    sharedMaterial: Material;

    skinController?: ControllerBaseClass;

    center: any; // v3
    halfExtents: any; // v3 / v6?



    // Methods

    clone(): Renderable;
    isSkinned(): boolean;
    hasCustomWorldExtents(): boolean;
    addCustomWorldExtents(extents: any);
    setNode(node: SceneNode);
    destroy();
};

//
// SceneNode
//
class SceneNode
{
    static version = 1;

    static _tempDirtyNodes: SceneNode[] = [];

    name                            : string;
    dynamic                         : boolean;
    disabled                        : boolean;

    dirtyWorld                      : boolean;
    dirtyWorldExtents               : boolean;
    dirtyLocalExtents               : boolean;

    //Counter of number of times modified.
    worldUpdate                     : number;
    frameVisible                    : number;
    rendererInfo                    : any; // TODO?

    local                           : any; // m43
    world                           : any; // m43

    localExtents                    : any; //
    localExtentsCenter              : any; // v3
    localHalfExtents                : any; // v3?
    customLocalExtents              : any; //

    worldExtents                    : any; //
    worldExtentsUpdate              : boolean;
    customWorldExtents              : any; //
    numCustomRenderableWorldExtents : number;

    spatialIndex                   : number;

    camera                          : Camera;

    parent                          : SceneNode;
    notifiedParent                  : boolean;
    scene                           : Scene;
    children                        : SceneNode[];
    childNeedsUpdateCount           : number;

    clonedObserver                  : Observer;
    destroyedObserver               : Observer;

    // Lights
    lights                          : Light[];
    lightInstances                  : LightInstance[];

    // Animation
    skin                            : any; // TODO:

    // Physics
    physicsNodes                    : PhysicsNode[];
    kinematic: boolean;

    // Geometry
    geometryinstances               : { [name: string]: GeometryInstance; };

    // // During loading
    // reference: string;
    // inplace: boolean;

    renderables: Renderable[];

    // On prototype
    mathDevice: MathDevice;
    arrayConstructor: any;

    //
    //SceneNode.makePath
    //
    static makePath(parentPath, childName)
    {
        return parentPath + "/" + childName;
    }

    //
    //SceneNode.invalidSetLocalTransform
    //
    static invalidSetLocalTransform()
    {
        debug.abort("setLocalTransform can not be called on static nodes.");
    }

    //
    // SceneNode
    //
    constructor(params)
    {
        this.name = params.name;

        var md = this.mathDevice;
        if (!md)
        {
            md = TurbulenzEngine.getMathDevice();
            SceneNode.prototype.mathDevice = md;
        }

        this.dynamic = params.dynamic || false;
        this.disabled = params.disabled || false;

        this.dirtyWorldExtents = true;
        this.dirtyLocalExtents = true;
        this.worldUpdate = 0; //Counter of number of times modified.
        this.frameVisible = -1;

        var local = params.local;
        if (local)
        {
            this.local = md.m43Copy(local);
        }
        else
        {
            this.local = md.m43BuildIdentity();
        }
        local = this.local;
        this.world = md.m43Copy(local);
    }

    //
{'fraction_non_alphanumeric': 0.09562771669649706, 'fraction_numerical': 0.006520071592942982, 'mean_word_length': 1.3471347134713472, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5352109', 'n_tokens_mistral': 2133, 'n_tokens_neox': 1988, 'n_words': 466}