Package imi.character

Examples of imi.character.CharacterParams


            return null;
        }

        // Generate the set of character attributes, and create a new avatar
        // character from that.
        CharacterParams cp = params.getCharacterParams();
        cp.setBaseURL(baseURL);

        WorldManager wm = ClientContextJME.getWorldManager();
        WlAvatarCharacter wlc = new WlAvatarCharacter.WlAvatarCharacterBuilder(cp, wm).addEntity(false).build();

        // We need to manually apply all of the colors if they are present
View Full Code Here


            logger.info("Generating params from url " + url);
           
            // Create character, fetch the IMI CharacterParams and generate a
            // WonderlandCharacterParams from that.
            WlAvatarCharacter wlchar = createAvatarCharacter(url);
            CharacterParams cp = wlchar.getCharacterParams();
            WonderlandCharacterParams wcp = null;
            try {
                if (cp.isMale() == true) {
                    wcp = WonderlandCharacterParams.loadMale();
                }
                else {
                    wcp = WonderlandCharacterParams.loadFemale();
                }
View Full Code Here

     * @return A CharacterParms
     */
    @XmlTransient
    public CharacterParams getCharacterParams() {
        // Take all of the configuration elements and apply them to the params
        CharacterParams out = new CharacterParams();
        for (ConfigElement element : getElements()) {
            element.apply(out);
        }

        return out;
View Full Code Here

     */
    public WlAvatarCharacter getAvatarCharacter(Cell avatarCell,
            String userName, AvatarConfigInfo info) {

        WorldManager wm = ClientContextJME.getWorldManager();
        CharacterParams attributes = new MaleAvatarParams(userName);

        // Formulate the configuration URL to load the info. If null, then use
        // some default.
        String avatarURL = DEFAULT_URL;
        if (info != null && info.getAvatarConfigURL() != null) {
            avatarURL = info.getAvatarConfigURL();
        }

        // Formulate the base URL for all default avatar assets. Annotate it
        // with the server:port of the primary session.
        String baseURL = null;
        try {
            URL tmpURL = AssetUtils.getAssetURL(BASE_URL, avatarCell);
            baseURL = tmpURL.toExternalForm();
        } catch (MalformedURLException ex) {
            logger.log(Level.WARNING, "Unable to form base url", ex);
            return null;
        }

        // Setup simple model, needs to actually have something to
        // play well with the system
        PScene simpleScene = new PScene(ClientContextJME.getWorldManager());
        simpleScene.addMeshInstance(new PPolygonMesh("PlaceholderMesh"), new PMatrix());
        attributes.setUseSimpleStaticModel(true, simpleScene);
        attributes.setBaseURL(baseURL);
       
        // Turn of animations for the simple avatar
        attributes.setAnimateBody(false);
        attributes.setAnimateFace(false);
        // Load the avatar using the new collada loading manager
        Node node = null;
        try {
            URL url = new URL(baseURL + avatarURL);
View Full Code Here

TOP

Related Classes of imi.character.CharacterParams

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.