javauis/m3g_qt/javasrc/javax/microedition/m3g/Fog.java
changeset 35 85266cc22c7f
equal deleted inserted replaced
26:dc7c549001d5 35:85266cc22c7f
       
     1 /*
       
     2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 package javax.microedition.m3g;
       
    20 
       
    21 public class Fog extends Object3D
       
    22 {
       
    23     public static final int EXPONENTIAL = 80;
       
    24     public static final int LINEAR = 81;
       
    25 
       
    26     public Fog()
       
    27     {
       
    28         super(_ctor(Interface.getHandle()));
       
    29     }
       
    30 
       
    31     /**
       
    32      */
       
    33     Fog(int handle)
       
    34     {
       
    35         super(handle);
       
    36     }
       
    37 
       
    38     public void setMode(int mode)
       
    39     {
       
    40         _setMode(handle, mode);
       
    41     }
       
    42 
       
    43     public int getMode()
       
    44     {
       
    45         return _getMode(handle);
       
    46     }
       
    47 
       
    48     public void setLinear(float near, float far)
       
    49     {
       
    50         _setLinear(handle, near, far);
       
    51     }
       
    52 
       
    53     public float getNearDistance()
       
    54     {
       
    55         return _getDistance(handle, Defs.GET_NEAR);
       
    56     }
       
    57 
       
    58     public float getFarDistance()
       
    59     {
       
    60         return _getDistance(handle, Defs.GET_FAR);
       
    61     }
       
    62 
       
    63     public void setDensity(float density)
       
    64     {
       
    65         _setDensity(handle, density);
       
    66     }
       
    67 
       
    68     public float getDensity()
       
    69     {
       
    70         return _getDensity(handle);
       
    71     }
       
    72 
       
    73     public void setColor(int RGB)
       
    74     {
       
    75         _setColor(handle, RGB);
       
    76     }
       
    77 
       
    78     public int getColor()
       
    79     {
       
    80         return _getColor(handle);
       
    81     }
       
    82 
       
    83     // Native methods
       
    84     private static native int _ctor(int hInterface);
       
    85     private static native void _setMode(int handle, int mode);
       
    86     private static native int _getMode(int handle);
       
    87     private static native void _setLinear(int handle, float near, float far);
       
    88     private static native float _getDistance(int handle, int which);
       
    89     private static native void _setDensity(int handle, float density);
       
    90     private static native float _getDensity(int handle);
       
    91     private static native void _setColor(int handle, int RGB);
       
    92     private static native int _getColor(int handle);
       
    93 }