All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ardor3d.extension.ui.text.TextMesh Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
/**
 * Copyright (c) 2008-2012 Ardor Labs, Inc.
 *
 * This file is part of Ardor3D.
 *
 * Ardor3D is free software: you can redistribute it and/or modify it 
 * under the terms of its license which may be found in the accompanying
 * LICENSE file or at .
 */

package com.ardor3d.extension.ui.text;

import com.ardor3d.renderer.IndexMode;
import com.ardor3d.scenegraph.Mesh;
import com.ardor3d.scenegraph.hint.CullHint;
import com.ardor3d.scenegraph.hint.LightCombineMode;
import com.ardor3d.scenegraph.hint.TextureCombineMode;

/**
 * Text spatial which uses textures generated by UIFont
 */
public class TextMesh extends Mesh {

    public TextMesh() {
        super("text");
        getMeshData().setIndexMode(IndexMode.Triangles);
        getSceneHints().setLightCombineMode(LightCombineMode.Off);
        getSceneHints().setTextureCombineMode(TextureCombineMode.Replace);

        // -- never cull
        setModelBound(null);
        getSceneHints().setCullHint(CullHint.Never);

        // -- default to non-pickable
        getSceneHints().setAllPickingHints(false);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy